Fix auto-SSO redirect for password-only auth providers - #59990
Closed
joe-bader wants to merge 1 commit into
Closed
Conversation
When only a password provider (e.g. basic auth) is configured, the auto-SSO path was redirecting to /auth/login?provider=basic which tries an OAuth redirect flow that doesn't exist for password providers — causing a NotImplementedError → 500 error. Fix: check if the provider supports password login and go directly to /login instead of trying an OAuth redirect.
Collaborator
Duplicate of #54887 — same fix at the same |
Contributor
|
Thanks for the focused reproduction and regression tests. This is an automated hermes-sweeper review; current
Closing as implemented on main. |
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.
Summary:
Problem:
When only a password provider (for example basic auth) is configured, the dashboard auto-SSO gate redirects unauthenticated HTML requests to /auth/login?provider=. Password providers do not implement the OAuth redirect flow, so that path raises NotImplementedError and returns a 500.
Fix:
Detect supports_password providers in the gate and redirect them to /login instead. Also build the next query parameter with the correct separator so /login gets ?next=... while OAuth providers keep &next=....
Test plan: