Login v2: /loginname?...&submit=true renders the full loginname form before auto-submitting, causing a visible flash when arriving via login_hint
Preflight checklist
- Searched existing issues (and the archived
zitadel/typescript) — no match found.
Environment
- ZITADEL: v4.16.1 (self-hosted, Docker
ghcr.io/zitadel/zitadel:v4.16.1) - Login: Login v2 (
ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_BASEURIset) - Flow: OIDC Authorization Code + PKCE from a SPA, passing
login_hint=<email>on the authorize request
Describe the bug
When an OIDC client initiates login with a login_hint, Login v2 does not navigate directly to the
password step. Instead it routes to:
/ui/v2/login/loginname?requestId=...&loginName=<email>&submit=trueThis page renders the full loginname form ("Welcome back! / Enter your login details.", the
Loginname input, Continue/Back buttons), then programmatically auto-submits (because of
submit=true) and redirects to:
/ui/v2/login/password?loginName=<email>The result is a brief but clearly visible flash of the loginname screen (empty field → pre-filled
field → redirect) before the password screen appears. Because the client already supplied the
identity via login_hint, the user never intended to see or interact with the loginname step — it
appears only as a transient artifact of the auto-submit redirect.
Steps to reproduce
- Configure an OIDC app on a Login v2 instance.
- Start an authorize request with
login_hint=<a valid user's email>. - Observe the browser lands on
/ui/v2/login/loginname?...&submit=true, which renders the loginname form, auto-submits, and redirects to/ui/v2/login/password. - The loginname form is visible for a few hundred ms before the password page renders.
Captured frames (redirect chain, ~200ms between t0 and t1):
- t0:
/ui/v2/login/loginname— loginname form, field empty - t1:
/ui/v2/login/loginname— same form, field pre-filled with the hinted email, Continue armed - settled:
/ui/v2/login/password— password form
Expected behavior
When submit=true (an auto-submit redirect the user is not meant to interact with), the loginname
page should not paint the full interactive form. It should render nothing / a neutral loading state
(e.g. a spinner) while it submits and redirects, so the user does not see a flash of a form they
never engaged with. Arriving via login_hint should feel like a direct jump to the password step.
Actual behavior
The full loginname form renders and is briefly visible before the auto-submit redirect to the password page.
Additional context
This is cosmetic (no functional impact — login completes correctly), but it reads as a UI glitch on
every login_hint-initiated login, which is the normal path for clients that collect the email on
their own page first.
Source: zitadel/zitadel