Skip to content

fix: skip auto-SSO redirect for password-only dashboard providers - #57427

Closed
fourtwentizzle wants to merge 1 commit into
NousResearch:mainfrom
fourtwentizzle:fix/dashboard-basic-auth-auto-sso
Closed

fix: skip auto-SSO redirect for password-only dashboard providers#57427
fourtwentizzle wants to merge 1 commit into
NousResearch:mainfrom
fourtwentizzle:fix/dashboard-basic-auth-auto-sso

Conversation

@fourtwentizzle

Copy link
Copy Markdown

Summary

  • prevent dashboard auto-SSO middleware from redirecting to /auth/login when the only provider is password-based (basic)
  • fall back to /login for password providers so users authenticate via /auth/password-login

Root cause

_auto_sso_response() assumed the single auth provider supports OAuth redirect login. For basic provider this is false, so /auth/login?provider=basic raised NotImplementedError and returned HTTP 500.

Fix

  • in hermes_cli/dashboard_auth/middleware.py, short-circuit auto-SSO when provider.supports_password is true

Verification

  • GET / now returns 302 /login?next=%2F (instead of /auth/login?provider=basic...)
  • GET /login returns 200 and renders the sign-in page
  • reproduced and validated on LAN bind (--host 0.0.0.0 --port 9119)

User impact

Fixes dashboard "Internal Server Error" on first load when basic auth is enabled and dashboard is exposed beyond loopback.

@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 3, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #54887 — same supports_password guard in _auto_sso_response() (hermes_cli/dashboard_auth/middleware.py) as the earliest open canonical fix for the password-only dashboard auto-SSO 500. This is one of many identical PRs in that cluster (related: #54958, #57214). Leaving open for maintainer to pick the canonical one.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused report and fix. This is now redundant on current main.

  • Automated hermes-sweeper review verified that hermes_cli/dashboard_auth/middleware.py:212 already returns None for supports_password providers, preserving the /login fallback instead of initiating OAuth auto-SSO.
  • Commit 3e24b16f5 (fix(dashboard): support mobile OAuth login) added that exact guard and regression coverage in tests/hermes_cli/test_dashboard_auth_password_login.py:201.
  • This also resolves the duplicate cluster noted in the earlier discussion, including canonical PR fix(dashboard-auth): skip auto-SSO redirect for password-only providers #54887.

Closing as implemented on main.

@teknium1 teknium1 closed this Jul 15, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 15, 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 sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants