Skip to content

Login: offer the password sign-in beside the identifier-first routing - #899

Merged
schmitch merged 1 commit into
mainfrom
claude/531-password-instead
Nov 17, 2026
Merged

schmitch merged 1 commit into
mainfrom
claude/531-password-instead

Conversation

@schmitch

Copy link
Copy Markdown
Member

Fixes #531

Problem

With the identifier-first login screen, POST /auth/identify sends every username of an OIDC realm's login domain to the identity provider, and the login page offered no other path. A password account in that domain (an administrator who added an Entra realm with their own domain, for one) could not sign in from the browser, although POST /auth/login still took its password.

Change

Web UI only (web/src/routes/Login.tsx); the server is untouched.

  • Identifier-first form: while a password realm is enabled (password: true in /auth/login-options), the username step offers Sign in with a password instead. It shows the password step for the entered username without asking /auth/identify.
  • After a refused or failed OIDC sign-in (/login?error=not_permitted or oidc_failed): the notice offers the same link, beside Try again. It shows a username and password form (the username is not known after the round trip). It also works over the remembered-account tiles; Try again and Back to your accounts leave it.
  • No account enumeration: both links depend only on the login options and the error code, and are shown for every username, including an empty field. /auth/identify is not changed and not called on this path.
  • Unchanged: the routing by login domain (Continue still goes to the IdP), the combined mode (its form asks for the password already, so its notices get no extra link), and the username_not_upn and unknown-code notices.

Choices worth a look:

  • While the notice offers the link, the form below does not repeat it, so the page never shows two links of the same name.
  • The link sits in the notice's text, under the message, not in its action slot: two actions at the end squeezed the message into a narrow column in the login card.

#530 handover

#530 (link an IdP identity at sign-in) has not landed on main; there is no pending-link code yet. Its link step replaces not_permitted for a linkable account, so it does not come back to /login?error=not_permitted and this notice does not apply there. Nothing here needs to change when it lands; a comment in Login.tsx says so.

Docs and changelog

  • docs/deployment.md: the login_mode row.
  • DEVELOPMENT.md: the identifier-first paragraph.
  • docs/changes/2.2.0/531.fixed.md. The issue was in Backlog; as the fix ships in the next release, I moved it to the 2.2.0 milestone and assigned it.

Verification

Run in web/:

  • pnpm exec vitest run src/routes/Login.test.tsx: 42 passed. The new tests cover: a login-domain account signs in with its password without /auth/identify; the link is offered for any username; an empty username is asked for; Continue still routes to the IdP; no link without a password realm; both notices offer it and sign in; the remembered-accounts case; Try again; other notices and the combined mode unchanged.
  • pnpm run test: 47 files, 635 tests passed.
  • pnpm run tsc, pnpm run knip, pnpm run e2e:tsc, pnpm run build: clean.
  • cargo xtask changelog --check: passes.
  • Looked at the three states (form, notice, password form) in Chromium against the built UI with mocked auth endpoints.

Not run:

  • The Playwright e2e suite (cargo xtask web-e2e): it needs Docker, and it has no OIDC realm to exercise this path. I added no e2e spec.
  • Rust build, lints and tests: no Rust code changed.
  • A sign-in against a real identity provider.

Generated by Claude Code

With the identifier-first login screen, /auth/identify sends every
username of an OIDC realm's login domain to the identity provider, so a
password account in that domain never reached the password prompt.

While a password realm is enabled, the identifier-first form now offers
"Sign in with a password instead": the password step for the entered
username, without asking /auth/identify. The notice of a refused or
failed OIDC sign-in (not_permitted, oidc_failed) offers the same as a
username and password form. Both are shown for every username, and
/auth/identify, the domain routing and the combined mode are unchanged.

Fixes #531

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJYcLa2wRNxtrsiarTo
@schmitch
schmitch added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit c670b24 Nov 17, 2026
19 checks passed
@schmitch
schmitch deleted the claude/531-password-instead branch November 17, 2026 09:04
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.

Identifier-first login: a password account in an OIDC realm's login domain cannot reach the password prompt

2 participants