Skip to content

feat(auth): expose auth methods and support OIDC-only login page - #288

Merged
0x2E merged 1 commit into
mainfrom
feat/auth-methods
Nov 22, 2026
Merged

0x2E merged 1 commit into
mainfrom
feat/auth-methods

Conversation

@0x2E

@0x2E 0x2E commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Summary

OIDC becomes a first-class auth method: an OIDC-only setup no longer needs FUSION_ALLOW_EMPTY_PASSWORD, and the login page shows only the methods that are enabled.

 config.Load
-  require password, or FUSION_ALLOW_EMPTY_PASSWORD
+  require password or OIDC issuer, or FUSION_ALLOW_EMPTY_PASSWORD (anonymous mode)

 SetupRouter
-  GET /api/oidc/enabled  -> {enabled}
+  GET /api/auth/methods  -> {password, oidc}
<LoginPage> (frontend/src/routes/login.lazy.tsx)
  authAPI.methods()
    pending        -> logo + title only
    oidc           -> "Sign in with OIDC"
    password       -> password form
    both           -> button + "or" + form
    neither        -> redirect into the app (replace)
    request fails  -> password form

Closes #283

Evidence

  • Before: OIDC issuer without a password fails at startup (FUSION_PASSWORD is required…); new handler tests get 404 from /api/auth/methods.
    After: ./scripts.sh test-backend and ./scripts.sh test-frontend pass.
  • Release-style build checked in headless Chromium for password-only, OIDC-only, password+OIDC and anonymous: correct controls and subtitle; with /api/auth/methods delayed 1.5s no password form or wrong subtitle flashes; real OIDC and password logins work; ?error=oidc_failed toast still shows.

Merge Danger

Door: two-way

Blast Radius: auth

  • GET /api/oidc/enabled is removed. The image HEALTHCHECK now uses /api/auth/methods, but custom compose/k8s probes on the old route will fail and need updating. Call this out in the release notes.
  • Validation is only relaxed; existing configurations keep starting.

🤖 Generated with Claude Code

OIDC-only deployments had to set FUSION_ALLOW_EMPTY_PASSWORD and still
saw a password form that no longer works. Make OIDC a first-class auth
method and let the login page render only the enabled methods.

- config: a configured OIDC issuer satisfies the auth requirement;
  FUSION_ALLOW_EMPTY_PASSWORD now only means anonymous mode.
- Replace GET /api/oidc/enabled with GET /api/auth/methods returning
  {password, oidc}. The Dockerfile healthcheck moves to the new route.
- Login page: show the OIDC button and/or password form per method,
  no controls until the request settles, new "Sign in to continue"
  subtitle, redirect into the app in anonymous mode.

BREAKING CHANGE: GET /api/oidc/enabled is removed. Custom healthchecks
or probes pointing at it must use /api/auth/methods.

Refs #283

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0x2E
0x2E merged commit a84226b into main Nov 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR] Disable Password Login Entirely if OIDC is Enabled

1 participant