A passkey sign-in interface must work when the credential is present and when it is not. A conditional browser prompt may suggest a discoverable credential in an input field, but support, platform behavior, and user settings differ. The application needs a clear direct sign-in action and an approved fallback such as another enrolled passkey, existing password flow, or recovery method. The fallback does not make a failed WebAuthn assertion valid; it starts a separate authenticated path. Avoid turning a canceled authenticator prompt into a permanent account lock or an endless spinner.
Passkey Conditional Sign-In and Fallback
Working case
Reviewer 29 has a passkey on a phone but opens the case-review app on a shared workstation. The sign-in page offers Use a passkey and the organization’s approved alternative. If the browser shows no credential, the reviewer can choose another device or the separate recovery path. If a conditional prompt is dismissed, the username field and normal controls remain usable. Reviewer 62, who has never enrolled a passkey, should not see an error implying that the account is broken. The server applies the same rate and abuse controls to fallback paths.
Implementation boundary
function availableSignInPaths(capability, hasApprovedFallback) {
return { passkey: capability === "available", fallback: hasApprovedFallback };
}
console.log(JSON.stringify(availableSignInPaths("missing", true)));
// Output: {"passkey":false,"fallback":true}Feature-detect WebAuthn before offering browser-dependent affordances, but do not equate API presence with a usable credential. Keep conditional mediation optional and cancel pending requests when the form mode changes or the route leaves, according to supported browser behavior. Give the person a visible path to choose a different method; avoid auto-retrying prompts after cancellation. The server owns method eligibility and account enumeration policy. When a password or recovery path succeeds, it issues a session under its own checks and may invite passkey enrollment after the session is established. Preserve focus and error text when switching methods.
Cost and boundaries
Conditional UI may reduce sign-in steps on familiar devices, but it adds states to test and can hold a pending browser request. A fallback increases maintenance cost yet prevents credential loss from becoming account loss. Requesting an unnecessary passkey prompt can interrupt work; hidden fallback links raise support burden. Measure successful sign-ins by method, cancellations, time to recover from a missing credential, and accessibility of method switching. Keep credential prompts distinct from server authentication outcomes in telemetry so a dismissed browser dialog is not counted as a security failure.
Failure trace
The page calls a conditional passkey request and hides the password form until it resolves. On a workstation without the passkey, the prompt stays pending and the reviewer cannot sign in. Restore visible alternate actions and cancel or ignore the stale request when the mode changes. Another UI says No account found after a browser returns no credential, leaking account state without server evidence. Use neutral language and follow the existing enumeration policy. Test no API, no credential, canceled prompt, browser back, slow server challenge, and a second sign-in method succeeding while the first request remains pending.
Verification
- No passkey or canceled prompt leaves another approved sign-in path.
- Switching methods does not create a session from a failed assertion.
- Keyboard and focus behavior remain usable across form modes.
Practice drill
Try sign-in on a device with the passkey, another device without it, and a browser that lacks the chosen conditional flow. Leave the route during a pending prompt and return. Select the approved fallback with keyboard only, then finish sign-in and inspect focus, title, and session creation. Confirm the server never accepts a canceled or failed passkey response as evidence and that ordinary account-abuse controls still apply to alternate methods.
Decision note
Offer passkeys as a clear route to sign-in while retaining an independent, tested path for missing or unavailable credentials.
Common Mistakes
- Hiding fallback until a browser prompt resolves.
- Treating API availability as proof a credential exists.
- Exposing account existence from a client-side no-credential result.
Connected lessons
Passkeys and Account Assurance; Passkey Registration Challenge and Credential Binding; Passkey Assertion, Origin, and Signature Verification; Passkey Management, Recovery, and Step-Up; Account Recovery and Session Revocation; Form Errors and Recovery Paths; Route Scroll and Focus Restoration.
Apply and check
Build Project: passkey account lifecycle and review Web Development: passkey and checkout decisions quiz.
