Conversation
Related to the dashboard-500-on-password-only-auth cluster (regression from #54846). This PR is NOT a duplicate of #54887 / #56639 / #56306 / #54958: those fix |
|
Thanks for identifying the password-provider failure mode. This is now implemented on Automated hermes-sweeper review evidence:
The existing behavior satisfies the PR's reported no-500 guarantee while guiding the browser to the usable password-login UI. |
|
This PR is a critical lifesaver! Currently, the Tested and verified that this correctly bypasses the faulty auto-SSO flow. Please merge this fix ASAP so we can deploy the next hotfix release! Huge thanks to @codxt! 👍🚀 |
Problem
The dashboard login flow calls
GET /auth/login?provider=<name>for interactive providers. Inhermes_cli/dashboard_auth/routes.py,auth_login()unconditionally callsp.start_login(...)once the provider exists andsupports_sessionis true.That breaks for
BasicAuthProvider, whosestart_login()intentionally raises:Result: clicking the dashboard login button for the basic/password provider returns 500 Internal Server Error instead of a clean client error, and the stack trace bubbles all the way to ASGI.
Root cause
auth_login()only catchesProviderError, butBasicAuthProvider.start_login()raisesNotImplementedError, so the request falls through as an unhandled exception.Fix
GET /auth/loginwith a clean400explaining that the client mustPOST /auth/password-logininstead.NotImplementedErrordefensively and convert it into a400rather than a 500.This preserves the intended split:
GET /auth/loginPOST /auth/password-loginRepro
/login.BasicAuthProvider is password-only; there is no OAuth redirect flow.