Skip to content

fix(dashboard-auth): route password-capable providers to /login instead of /auth/login - #60247

Closed
jon9314 wants to merge 1 commit into
NousResearch:mainfrom
jon9314:fix/dashboard-basic-auth-login-redirect
Closed

fix(dashboard-auth): route password-capable providers to /login instead of /auth/login#60247
jon9314 wants to merge 1 commit into
NousResearch:mainfrom
jon9314:fix/dashboard-basic-auth-login-redirect

Conversation

@jon9314

@jon9314 jon9314 commented Jul 7, 2026

Copy link
Copy Markdown

Reproduces and fixes the tracked BasicAuthProvider 500 on current main.

  • Root cause: auto-sso middleware sends a single interactive provider to /auth/login, but password-capable providers implement no OAuth redirect flow.
  • Fix: middleware now routes password-capable providers to /login so the form can render.
  • Added regression coverage for redirect target, form rendering, and /auth/password-login returning ok.

Fixes #58166

…ad of /auth/login

BasicAuthProvider and other password-capable providers do not implement
the OAuth redirect flow in start_login(). The auto-sso middleware was
sending them to /auth/login, where start_login() raises NotImplementedError
and the request returns HTTP 500.

Restrict the OAuth auto-redirect to providers that actually need it. When
a provider exposes password login, redirect to the unified login form
instead.

Fixes auth redirection bug for dashboard instances using basic auth.
@alt-glitch alt-glitch added type/bug Something isn't working comp/dashboard Web dashboard / control panel UI (dashboard/, landing) area/auth Authentication, OAuth, credential pools P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jul 7, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #54887 (earliest-open canonical fix for the dashboard password-only auth 500). Both patch _auto_sso_response in middleware.py with the same supports_password guard to avoid the OAuth-redirect flow; #54887 falls through with return None, this PR does an explicit redirect to /login — same code site, same mechanism. See also the broader superset PR #58171 (also fixes the /auth/login route).

@jon9314

jon9314 commented Jul 11, 2026

Copy link
Copy Markdown
Author

Closing as redundant — the dashboard auth redirect bug this targets was fully fixed on main by #61330 (merged as commit 4734071), which includes the supports_password guard plus the sibling routes.py/auth_login redirect site this PR addressed. Thanks!

@jon9314 jon9314 closed this Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools comp/dashboard Web dashboard / control panel UI (dashboard/, landing) duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(dashboard-auth): GET /auth/login?provider=basic returns HTTP 500 (NotImplementedError in BasicAuthProvider.start_login)

2 participants