fix(dashboard-auth): skip auto-SSO redirect for password-only providers - #54958
Closed
divinely4125 wants to merge 1 commit into
Closed
fix(dashboard-auth): skip auto-SSO redirect for password-only providers#54958divinely4125 wants to merge 1 commit into
divinely4125 wants to merge 1 commit into
Conversation
_auto_sso_response() auto-redirects to /auth/login when exactly one interactive provider is registered. For password-only providers (e.g. BasicAuthProvider with supports_password=True), /auth/login calls start_login() which raises NotImplementedError — there is no OAuth flow. This caused an Internal Server Error on every unauthenticated dashboard load when basic auth was the sole provider. Skip the auto-redirect when the single provider has supports_password, falling through to the /login interstitial which renders the credential form.
Collaborator
Duplicate of #54887 — same one-line |
This was referenced Jun 29, 2026
fix(dashboard): basic-auth password-only provider 500s on first load (auto-SSO assumes OAuth)
#57989
Closed
This was referenced Jul 6, 2026
Contributor
|
Thanks for the focused fix. 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
_auto_sso_response()inhermes_cli/dashboard_auth/middleware.pyauto-redirects unauthenticated HTML navigations to/auth/login?provider=<name>when exactly one interactive provider is registered. This is an optimization for the OAuth (Nous Portal) case — it skips the/logininterstitial click.Bug: When the sole registered provider is password-only (e.g.
BasicAuthProviderwithsupports_password = True), the redirect hits/auth/login→p.start_login()→NotImplementedError:This produces an Internal Server Error on every unauthenticated dashboard load when basic auth is the only provider — the user never sees the login form.
Fix
Skip the auto-SSO redirect when the single provider has
supports_password = True. Falls through to_unauth_response()→ the/logininterstitial, which renders the credential form and POSTs to/auth/password-loginas designed.Reproduction
dashboard.basic_auth(username + password_hash) in config.yaml with no OAuth providerhermes dashboard --host 0.0.0.0 --port 9119Test plan
/logininterstitial form/loginchooser (no regression)