fix(dashboard-auth): skip auto-SSO redirect for password-only providers - #54884
Closed
sjfkai wants to merge 1 commit into
Closed
fix(dashboard-auth): skip auto-SSO redirect for password-only providers#54884sjfkai wants to merge 1 commit into
sjfkai wants to merge 1 commit into
Conversation
_auto_sso_response unconditionally redirects a single provider to /auth/login (the OAuth PKCE entry point). BasicAuthProvider is the only registered provider in password-only setups, and its start_login() raises NotImplementedError because it has no OAuth redirect flow. Check supports_password before attempting the OAuth redirect; when True, fall through to the normal /login interstitial which renders the username/password form wired to /auth/password-login. Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Jun 29, 2026
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
Fix a
NotImplementedErrorcrash when the dashboard is bound to anon-loopback host with a password-only auth provider (e.g.
BasicAuthProvider).Background
PR #54846 introduced
_auto_sso_response()to silently bounceunauthenticated users through the portal OAuth flow when exactly one
interactive provider is registered. The assumption was that a single
provider would always be an OAuth provider — but
BasicAuthProvidersets
supports_password = Trueand has no OAuth redirect flow. Itsstart_login()raisesNotImplementedError:This only triggers when all of the following hold:
--host 0.0.0.0)auth_required = True)BasicAuthProvideris registered (no OAuth provider)Fix
In
_auto_sso_response(), checksupports_passwordbefore attemptingthe OAuth redirect. When the sole provider is password-only, return
Noneso the caller falls through to the normal/logininterstitialwhich renders the username/password form.
Testing
Verified locally:
--host 0.0.0.0withBasicAuthProvideronly → login page renderscorrectly (was: 500
NotImplementedError)--host 127.0.0.1→ auth gate inactive, unaffectedNoneat thelen != 1check,unaffected