SimpleAuthManager: preserve deep-link next URL on first login#67965
Open
GayathriSrividya wants to merge 1 commit into
Open
SimpleAuthManager: preserve deep-link next URL on first login#67965GayathriSrividya wants to merge 1 commit into
GayathriSrividya wants to merge 1 commit into
Conversation
Contributor
|
Fixed in #67483? |
fd5f692 to
71b9a0c
Compare
Contributor
Author
|
Good question. I checked this against #67483, and there is still a gap this PR covers. What #67483 fixed:
What it did not change:
Why this still matters:
So #67483 handles consumption of next, while this PR handles propagation of next into the login URL generation path. |
2bdfc57 to
24fff64
Compare
vincbeck
approved these changes
Jun 3, 2026
24fff64 to
20142fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #67476
When unauthenticated users opened a deep link, some login paths called
get_url_login(next_url=...).SimpleAuthManagerignored this kwarg, so it always redirected to/auth/loginor/auth/token/loginwithout preservingnext, which caused users to land on the homepage after their first login.This change makes
SimpleAuthManager.get_url_loginhonor the optionalnext_urlargument by appending a URL-encodednextquery parameter for both regular and all-admin login endpoints.Added unit tests for:
next_urlnext_urlValidation:
/opt/homebrew/bin/ruff format + check --fixpassedpytestrun failed in this workspace due to a missing test dependency:tests_common