fix(dashboard-auth): skip auto-SSO redirect for password-only providers - #58980
Closed
jahartling wants to merge 1 commit into
Closed
fix(dashboard-auth): skip auto-SSO redirect for password-only providers#58980jahartling wants to merge 1 commit into
jahartling wants to merge 1 commit into
Conversation
The auto-initiated SSO redirect added in f5ecbe1 assumes every interactive provider speaks OAuth (has a start_login() method). When the only registered provider is BasicAuthProvider (supports_password=True), the redirect to /auth/login?provider=basic calls start_login() which raises NotImplementedError — password-only providers have no OAuth redirect flow. Fix: check supports_password on the single provider in _auto_sso_response(). When True, return None so the call falls through to the /login interstitial which correctly renders the password form.
Collaborator
Duplicate of #54887 — same file ( |
Contributor
|
Thanks for the focused fix. This automated hermes-sweeper review found that the exact behavior is already on current
Closing as implemented on main; the PR's change is redundant with the current implementation. |
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.
The auto-initiated SSO redirect added in f5ecbe1 assumes every interactive provider speaks OAuth (has a
start_login()method). When the only registered provider isBasicAuthProvider(supports_password=True), the redirect to/auth/login?provider=basiccallsstart_login()which raisesNotImplementedError— password-only providers have no OAuth redirect flow.Root cause:
_auto_sso_response()checks whether the single provider is interactive (supports_session=True) but doesn't distinguish password-based providers from OAuth-based ones.Fix: Check
supports_passwordon the single provider. WhenTrue, returnNoneso the call falls through to the/logininterstitial, which correctly renders the password form.Reproduction:
dashboard.basic_authwithusernameandpassword_hashin config.yamlhttp://localhost:9119/cc @benbarclay @teknium1