fix: skip auto-SSO redirect for password-only auth providers - #56082
Closed
Stoltemberg wants to merge 1 commit into
Closed
fix: skip auto-SSO redirect for password-only auth providers#56082Stoltemberg wants to merge 1 commit into
Stoltemberg wants to merge 1 commit into
Conversation
_auto_sso_response() unconditionally redirects to /auth/login when there is exactly one session provider. For password-only providers (e.g. BasicAuthProvider), /auth/login calls start_login() which raises NotImplementedError → 500 Internal Server Error. Fix: check provider.supports_password before redirecting. If True, return None to let the /login interstitial render the credential form. Fixes NousResearch#56067
Collaborator
Duplicate of #54887 (earliest open canonical) — this is the sixth identical |
4 tasks
This was referenced Jul 4, 2026
Contributor
|
Implemented on current
|
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.
What does this PR do?
_auto_sso_response()unconditionally redirects to/auth/loginwhen there is exactly one session provider. For password-only providers (e.g. BasicAuthProvider),/auth/logincallsstart_login()which raisesNotImplementedError→ 500 Internal Server Error.Fix: check
provider.supports_passwordbefore redirecting. If True, returnNoneto let the/logininterstitial render the credential form.Related Issue
Fixes #56067
Type of Change
Changes Made
hermes_cli/dashboard_auth/middleware.py: Added guard in_auto_sso_response()to skip auto-redirect when the sole provider is password-only.How to Test
http://host:9119/in browser/loginwith credential form (not 500)Checklist