v157 · webauthn · composition
Passive + autofill, one request
On a real sign-in page you can have it both ways. The explainer: “Credentials can be simultaneously made available in Passive Mode UI and autofill UI with a single JavaScript call.” This page arms exactly one request, lets you flip between the passive+autofill and autofill-only shapes, and shows the abort-and-re-arm dance an explicit passkey button needs.
a sign-in page that wants both surfaces
One navigator.credentials.get() call, armed on load. With uiMode: 'passive' the browser shows its non-modal suggestion straight away; if you ignore it and later focus the username field, the same pending request surfaces in autofill. Picking a credential in either place resolves the one promise.
Pending request: idle
Waiting for capability probe…
event log
rules this page follows
- One request, two surfaces. Don’t fire a second conditional request for the form: only one WebAuthn request can be pending per page, and the spec routes both prompts to the same
|silentlyDiscoveredCredentials|list. - Abort before the modal. The “Sign in with a passkey” button aborts the pending conditional request, runs an ordinary modal
get(), then re-arms the passive+autofill request. - Same fallback as before. Without passive support the request is exactly the existing conditional autofill request, so the form keeps working everywhere.