Repository navigation
Login: offer the password sign-in beside the identifier-first routing - #899
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #531
Problem
With the identifier-first login screen,
POST /auth/identifysends 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, althoughPOST /auth/loginstill took its password.Change
Web UI only (
web/src/routes/Login.tsx); the server is untouched.password: truein/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./login?error=not_permittedoroidc_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./auth/identifyis not changed and not called on this path.username_not_upnand unknown-code notices.Choices worth a look:
#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 replacesnot_permittedfor a linkable account, so it does not come back to/login?error=not_permittedand this notice does not apply there. Nothing here needs to change when it lands; a comment inLogin.tsxsays so.Docs and changelog
docs/deployment.md: thelogin_moderow.DEVELOPMENT.md: the identifier-first paragraph.docs/changes/2.2.0/531.fixed.md. The issue was inBacklog; as the fix ships in the next release, I moved it to the2.2.0milestone 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.Not run:
cargo xtask web-e2e): it needs Docker, and it has no OIDC realm to exercise this path. I added no e2e spec.Generated by Claude Code