fix(cli): skip auto-SSO redirect for password-only auth providers - #55330
fix(cli): skip auto-SSO redirect for password-only auth providers#55330AlexFucuson9 wants to merge 1 commit into
Conversation
Fixes NousResearch#55130 _auto_sso_response() redirects unauthenticated HTML loads directly to /auth/login when exactly one provider is registered. For password-only providers (e.g. basic), /auth/login calls start_login() which raises NotImplementedError, producing HTTP 500. Check supports_password on the sole provider and return None (fall through to the normal /login page with the password form) when it is a password-only provider.
Duplicate of #54887 (earliest open canonical fix for #55130). This adds the byte-for-byte same |
tonydwb
left a comment
There was a problem hiding this comment.
LGTM. Skips auto-SSO redirect for password-only auth providers. Trivially safe one-liner.
Code Review SummaryVerdict: Approved Skips the auto-SSO redirect for password-only auth providers (e.g. basic auth). Without this, the redirect would call start_login() which raises NotImplementedError for non-OAuth providers. ✅ Looks Good
Reviewed by Hermes Agent |
|
Thanks for the focused fix. This is now implemented on current
|
Fixes #55130
_auto_sso_response()redirects unauthenticated HTML loads directly to/auth/loginwhen exactly one provider is registered. For password-only providers (e.g.basic),/auth/logincallsstart_login()which raisesNotImplementedError, producing HTTP 500.Fix: Check
supports_passwordon the sole provider and returnNone(fall through to the normal/loginpage with the password form) when it is a password-only provider.