Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure built-in UI verification redirect includes code #6982

Merged
merged 1 commit into from Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 11 additions & 14 deletions edb/server/protocol/auth_ext/http.py
Expand Up @@ -1479,20 +1479,17 @@ async def handle_ui_verify(self, request: Any, response: Any):
case _:
maybe_pkce_code = None

match maybe_redirect_to:
case str(rt):
redirect_to = (
_with_appended_qs(
rt,
{
"code": [maybe_pkce_code],
},
)
if maybe_pkce_code
else rt
)
case _:
redirect_to = cast(str, ui_config.redirect_to)
redirect_to = maybe_redirect_to or redirect_to
redirect_to = (
_with_appended_qs(
redirect_to,
{
"code": [maybe_pkce_code],
},
)
if maybe_pkce_code
else redirect_to
)

except errors.VerificationTokenExpired:
app_details_config = self._get_app_details_config()
Expand Down