Skip to content
Customer IdentityMarkdown

Passkey sign-in for customers

Let customers sign in with a passkey alone, with nothing to type and nothing to phish, and decide what a customer without one is asked for.

Available, with limitsAPIWebAuthn Level 3

A passkey is the best sign-in for a customer: nothing to remember, nothing to type, and nothing a fake site can capture. Every realm signs a customer in with a passkey alone, from the first day, bound to your realm’s own domain. Customers who haven’t added one yet sign in with a password and a second step, and add a passkey once they’re in.

  • Privilege: RealmOwner in the customer realm to change passkey and sign-in settings. Customers need no privilege to add or remove their own passkeys.
  • Where: settings through the API; customers add and remove passkeys on their account page or through the API.
  • A host name for the realm, such as foobar.cvyuh.com. A realm created with one has passkeys from the start.

Every new realm signs customers in this way:

  1. A passkey, if they have one. It signs the customer in on its own. A customer with no passkey, or a name the realm doesn’t hold, makes this step stand aside, so the next page reveals nothing about which it was.
  2. Otherwise, a password, then a code from an authenticator app, which a new realm requires. A customer with no app is walked through setting one up the first time.

Customers add a passkey from their account page: it confirms it’s still them, then registers the passkey. Within 10 minutes of signing in, the confirmation stands aside; after that, they confirm with their authenticator app or a passkey they already hold. Right after a fresh sign-in, the browser can offer to make one quietly. With their first factor, the realm shows them a set of one-time recovery codes, once.

Passkeys are bound to the realm’s relying party ID, rpId. A realm created with a host name, such as foobar.cvyuh.com, has that host as its rpId, so passkeys work from the start.

As a realm administrator, with your session in $CVYUH_SESSION (see Call the API).

  1. Check the passkey domain, and set the name customers see when their device asks to save one:

    Terminal window
    curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/webauthnSettings/webauthnSettings \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
    -H "Content-Type: application/json" \
    -d '{ "rpId": "foobar.cvyuh.com", "rpName": "Example" }'

    Choose rpId once: changing it later orphans every passkey the realm holds.

  2. Decide whether customers without a passkey need a second step. Requiring it (twoFactorMandatory: true, the default in a new realm) asks every password sign-in for an authenticator-app code. Turning it off lets a customer who has no app skip setting one up, for twoFactorSkipDays at a time:

    Terminal window
    curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/authSettings/authSettings \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
    -H "Content-Type: application/json" \
    -d '{ "twoFactorMandatory": false, "twoFactorSkipDays": 30 }'

    A customer who signs in with a passkey is never asked for a second step either way.

  • Adding a passkey. On their account page they choose to add one. Their device shows its own prompt, naming your rpName and their sign-in name, and asks for a fingerprint, a face or the device PIN. On a computer without a passkey of its own, the browser offers to save it on a phone, by a QR code the phone scans.
  • Signing in with one. They type their sign-in name, and the device asks them to confirm with a fingerprint, face or PIN. That’s the whole sign-in. A passkey kept on their phone works from a computer the same way, by a QR code.
  • When it fails. A passkey that doesn’t verify, or a prompt the customer cancels, shows “That passkey did not work. Try again.” After three tries (attemptsPerLogin), the sign-in fails and they start again. A customer whose passkey keeps failing signs in with their password and authenticator app instead.
SettingDefaultRange
rpIdThe host name the realm was created withOne of the realm’s host names, or a domain they sit under that no other realm’s host names share
userVerificationpreferredrequired shuts out security keys without a PIN or biometric
residentKeyrequiredPasskeys are kept on the device, so the customer picks theirs without typing more
timeoutSeconds300300 to 600
attemptsPerLogin31 or more
twoFactorMandatorytrue in a new realm
twoFactorSkipDays300 makes a skip permanent
relatedOriginsnoneAt most five domains
SymptomCauseFix
No passkey prompt; customers go straight to a passwordThe realm has no rpId, or the customer has no passkey yetSet rpId; customers add a passkey from their account page
Passkeys stopped working for everyonerpId was changedSet it back. Passkeys made under the old rpId work only there
The prompt never appears inside your mobile appThe sign-in is in an embedded web view, which often can’t reach the device’s passkeysOpen the sign-in in the system browser (ASWebAuthenticationSession on iOS, Custom Tabs on Android)
A passkey from one brand isn’t offered on anotherEach realm has its own rpIdExpected: see A realm per brand
A customer can’t add a new passkeyThey hold a passkey the realm has turned offThey remove it from their account page, then add the new one
  • A customer has a new phone. A synced passkey, one kept in their Apple, Google or password-manager account, arrives on the new phone by itself. A passkey kept on the old device alone doesn’t: they sign in with their password and authenticator app, then add a passkey on the new phone.
  • A customer lost their device. They sign in with their password and authenticator app, remove the lost passkey from their account page or through Self-service, and add a new one. Recovery codes don’t stand in for a lost passkey today; they stand in for a lost authenticator app.
  • Which browsers work? Current versions of the major browsers on Windows, macOS, iOS, Android and Linux, and security keys that keep passkeys on the key.
  • Does it work in a web view? Embedded web views usually can’t; open the sign-in in the system browser.

Each passkey sign-in is a LOGIN or LOGIN_FAILED record on the customer’s audit trail, with the passkey step’s result. A passkey added or removed is a change to the customer’s factors, and a change to webauthnSettings or authSettings is in Change history.

  • Attestation is limited. The realm accepts none and self-attested packed statements only, and doesn’t check an authenticator’s maker against a trust chain.
  • One realm, one domain. Passkeys made for one brand’s realm don’t work in another’s; see A realm per brand.
  • A lock stops passkeys too. A customer whose account is locked can’t sign in with a passkey until the lock ends; see Protect customer sign-in.

Passkeys offered as the customer types their name, and a recovery code for a lost passkey, are on What’s next for authentication.