Passkey Web Authentication: Registration, Sign-In, Federation, and Manager Sync
How passkeys, WebAuthn sign-in flows, FedCM federation, and the Signal API work together for phishing-resistant web login.
This page summarizes Chrome for Developers documentation on passkeys (discoverable WebAuthn credentials), sign-in UX modes (Conditional UI and Immediate UI), automatic passkey promotion, FedCM for federated login without third-party cookies, and the Signal API for keeping password managers aligned with your server.
Passkeys and WebAuthn: what they are and why sites use them
Section titled “Passkeys and WebAuthn: what they are and why sites use them”Passkeys are account credentials bound to your site’s Relying Party (RP) ID (your registrable domain). Users unlock a platform authenticator (fingerprint, face, device PIN) instead of typing a password. WebAuthn (navigator.credentials.create / navigator.credentials.get) lets the browser mediate that exchange using public-key cryptography.
Phishing is the top security problem on the web: 81% of hacking-related account breaches last year leveraged weak or stolen passwords. The industry’s collective response to this problem has been multi-factor authentication, but implementations are fragmented and most still don’t adequately address phishing.
Passkeys inherit WebAuthn properties described in Passwordless sign-in on forms with WebAuthn passkey autofill: the site stores public keys, not shared secrets, and credentials only work on the origin that created them—so typical phishing pages cannot reuse them.
Before any client code runs, Chrome’s Passkeys Orientation requires a secure context (https:// or http://localhost) and an RP ID that matches your deployment domain (for example example.com for login.example.com).
Passkey registration: server options and client create()
Section titled “Passkey registration: server options and client create()”Passkey registration is WebAuthn credential creation with discoverable (resident) keys so users can sign in without entering a username first.
Core server-side choices from Passkey Registration:
| Option | Typical value | Why |
|---|---|---|
authenticatorSelection.residentKey |
"required" |
Discoverable passkey |
authenticatorSelection.userVerification |
"preferred" or "required" |
Biometrics/PIN when available |
excludeCredentials |
User’s existing credential IDs | Avoid duplicate keys on the same provider |
authenticatorAttachment |
"platform" (promotion) or omit (settings) |
Platform-only vs platform + security keys |
On the client, decode JSON from your backend with PublicKeyCredential.parseCreationOptionsFromJSON(), call navigator.credentials.create({ publicKey }), then send credential.toJSON() to a verification endpoint that checks the session challenge and stores the public key.
Google strongly recommends that relying parties not attempt to maintain allowlists of authenticators.
AAGUID (authenticator model ID) from registration is for UX labels only—show provider name/icon in account settings, not for access control (Passkeys Orientation, Passkey Management).
Backend verification should use a vetted FIDO2 library; Chrome lists options in the orientation guide (SimpleWebAuthn, py_webauthn, WebAuthn4J, and others).
Passkey sign-in: discoverable auth, Conditional UI, and explicit buttons
Section titled “Passkey sign-in: discoverable auth, Conditional UI, and explicit buttons”Discoverable authentication (empty allowCredentials)
Section titled “Discoverable authentication (empty allowCredentials)”For “Sign in with passkey” without a username field, request discoverable credentials with allowCredentials: [], a session-bound challenge, and persist userVerification in the session (Passkey Authentication).
If verification fails because the credential ID is unknown, return HTTP 404 so the client can call PublicKeyCredential.signalUnknownCredential() (see below).
Conditional UI (mediation: 'conditional')
Section titled “Conditional UI (mediation: 'conditional')”Conditional UI registers passkey (and password) suggestions in the browser autofill path when the user focuses the username field—no modal until selection.
Allowing websites to make a WebAuthn request without triggering the modal UI is called “conditional mediation”. This autofill integration is often referred to as a conditional UI.
— Chrome, Passwordless sign-in on forms with WebAuthn passkey autofill
Detect support with PublicKeyCredential.getClientCapabilities() → conditionalGet. Start conditional get() on page load with an AbortController; abort that call before opening an explicit passkey button prompt to avoid collisions (Passkey Authentication).
When to use which sign-in pattern
Section titled “When to use which sign-in pattern”| Moment | Pattern | Guide |
|---|---|---|
| Dedicated sign-in form | Conditional UI on inputs + explicit passkey button | Passkey Authentication |
| Header “Sign in”, checkout, paywall, Like/Save | Immediate UI (next section) | Immediate UI mode for logins |
| Signed-in user, sensitive action | Reauth with non-empty allowCredentials |
Passkey Reauthentication |
Immediate UI mode: quick sign-in before navigation
Section titled “Immediate UI mode: quick sign-in before navigation”Immediate UI mode (uiMode: 'immediate' on navigator.credentials.get()) shows a unified account chooser when local passkeys or saved passwords exist; otherwise it fails fast with NotAllowedError so your app can fall back to a sign-in page or guest checkout.
Immediate UI mode provides a mode that fails promptly if no local credentials are locally available. When credentials exist, the browser presents an immediate login dialog to the user. Otherwise, it rejects the promise silently, letting you provide alternative sign-in methods.
— Chrome, Immediate UI mode for logins
Check capabilities.immediateGet via PublicKeyCredential.getClientCapabilities() before calling Immediate UI—unsupported browsers may ignore the flag and show a blocking modal (Quick sign-ins with immediate UI mode).
Typical invocation (after a user gesture):
const cred = await navigator.credentials.get({ password: true, publicKey: parsedOptions, uiMode: 'immediate',});Privacy rules from Immediate UI mode for logins: require a user gesture; no non-empty allowCredentials; no signal to dismiss the dialog; Incognito always throws NotAllowedError.
Handle cred.type === 'public-key' vs 'password' with separate verify endpoints (Quick sign-ins with immediate UI mode).
Conditional Create: silent passkey after password login
Section titled “Conditional Create: silent passkey after password login”Conditional Create (navigator.credentials.create({ publicKey, mediation: 'conditional' })) lets the password manager create a passkey without a modal right after a successful password sign-in—when a saved password was used recently.
To help users adopt passkeys more conveniently, use a WebAuthn API feature called Conditional Create. Conditional Create lets your site request a passkey for the user without requiring any action from them.
Gates: password-based login only (not magic links, SMS OTP, or FedCM-only flows); detect conditionalCreate in client capabilities; abort any pending conditional get first; silently ignore InvalidStateError, NotAllowedError, AbortError; on the server, relax User Presence for conditional-create verifications only (Passkey Conditional Create).
If the browser creates a passkey but server registration fails, call signalUnknownCredential() to avoid orphaned keys in the manager.
Signal API: keep passkey providers aligned with your database
Section titled “Signal API: keep passkey providers aligned with your database”Password managers cache usernames and credential IDs. If the server deletes or renames an account but the manager still offers the old passkey, sign-in fails confusingly.
The WebAuthn Signal API lets relying parties signal existing credentials to connected passkey providers. This lets a supporting passkey provider update or remove incorrect or revoked passkeys from its storage so users are no longer offered them.
— Chrome, Keep passkeys consistent with credentials on your server with the Signal API
| Method | When to call |
|---|---|
signalUnknownCredential({ rpId, credentialId }) |
Login verify returns 404 (unauthenticated user) |
signalAllAcceptedCredentials({ rpId, userId, allAcceptedCredentialIds }) |
After sign-in or credential delete on account settings |
signalCurrentUserDetails({ rpId, userId, name, displayName }) |
After profile username/display name update or sign-in |
Always feature-detect each method. Pass Base64URL strings for IDs (Signal API, Passkey Management).
Empty allAcceptedCredentialIds lists
Calling signalAllAcceptedCredentials with a missing or empty list can hide all passkeys for that user in supporting managers.
FedCM: federated “Sign in with …” without third-party cookies
Section titled “FedCM: federated “Sign in with …” without third-party cookies”When your login is federated (user authenticates at an Identity Provider, IdP), classic iframe and cookie flows break as browsers restrict third-party cookies. FedCM (navigator.credentials.get({ identity: { providers: [...] } })) provides a browser-mediated account chooser.
Federated Credential Management (FedCM) is a privacy-centric and user-friendly approach to federated identity services (such as Sign in with Identity Provider) that doesn’t rely on third-party cookies or navigational redirects.
— Chrome, FedCM: A privacy-preserving identity federation API
FedCM is protocol-agnostic: an OAuth/OIDC server can still exchange tokens after FedCM returns a browser-mediated result (FedCM overview).
IdP responsibilities include /.well-known/web-identity, config JSON, accounts / ID assertion / login endpoints, Sec-Fetch-Dest: webidentity checks, and Login Status API (Set-Login: logged-in / navigator.login.setStatus) (Implement FedCM on the Identity Provider side, Email provider (issuer) implementation).
Relying Parties call FedCM when IdentityCredential exists, pass each IdP’s configURL and clientId, and keep a non-FedCM fallback for other browsers (Implement FedCM on the Relying Party side). Users can disable third-party sign-in or trigger cooldown after dismissing prompts (FedCM API customization and opt-out).
FedCM complements passkeys: Federated Credential Management API updates describes roadmap work to unify passkeys, autofill, and federation.
Cross-site passwords and optional federated sign-up UI
Section titled “Cross-site passwords and optional federated sign-up UI”Affiliated domains can share saved passwords via Digital Asset Links at /.well-known/assetlinks.json (Chrome 91+) (Enable seamless credential sharing across websites in Chrome).
For classic email/password sign-up, Chrome recommends also offering federated login so you store fewer passwords (Build a sign-up form that follows best practice).
Common mistakes
Section titled “Common mistakes”- RP ID mismatch →
SecurityErroron create/get; fix DNS andrp.idconsistency. - Immediate UI on the wrong surface → blocked cross-device passkeys or failed step-up (UX patterns for Immediate UI mode).
- Skipping
immediateGetdetection → modal QR UI on unsupported browsers (Quick sign-ins with immediate UI mode). - Conditional create after non-password login → silent no-op; wait until password MFA completes (Help users adopt passkeys more seamlessly).
- Treating conditional-create UP/UV flags as strict → false verification failures; ignore UP/UV on server for that path (Help users adopt passkeys more seamlessly).
- FedCM without Login Status → extra accounts requests and poor UX (Implement FedCM on the Identity Provider side).
- CSP
connect-srcblocks IdP endpoints → FedCM fails silently until allowed (Implement FedCM on the Relying Party side).
How to check this on your site
Section titled “How to check this on your site”-
On a staging origin over HTTPS, open DevTools → WebAuthn, enable virtual authenticators, register and sign in against your flows (WebAuthn panel overview).
-
Run
await PublicKeyCredential.getClientCapabilities()in the console and confirmconditionalGet,conditionalCreate, andimmediateGetmatch what you ship (Immediate UI mode for logins, Help users adopt passkeys more seamlessly). -
Test sign-in form Conditional UI by focusing the username field; confirm autofill suggestions appear (Passwordless sign-in on forms with WebAuthn passkey autofill).
-
With third-party cookies blocked (Incognito or
chrome://settings/cookies), exercise FedCM and filter DevTools Network withresource-type:fedcm(Set up your development environment to implement FedCM). -
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about.