Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

Security keys, passkeys, and biometrics

A passkey signs Ava in by proving that her device holds a private key registered to her account. Nothing she could read, type or approve on a fake page is sent, and the fingerprint or PIN that unlocks the key never leaves her device.

Signing in with your device

Every method in the last lesson ended with something a person reads, types or approves, and a convincing fake page can ask for any of them. Public-key sign-in takes a different route. When Ava signs in to the photo service with a passkey, her phone asks for her fingerprint, and a moment later she is signed in. She never typed an email address or a password.

The fingerprint did not go to the photo service. As with the security-key PIN in Passwords and PINs, it only unlocks an authenticator on Ava's device. The authenticator then uses a key to produce a response the photo service can check.

That key belongs to a public-key credential: a key pair of the kind described in Secrets and key pairs, created for Ava's account at the photo service and for nothing else. The photo service stores the public key. The private key stays with the authenticator, and the photo service checks signatures made with it without ever receiving it.

Several names describe the parts. WebAuthn (Web Authentication) is the browser standard that lets a web page ask the browser to create or use this kind of credential. The authenticator can be a separate security key, a small device that connects by USB or by NFC, the short-range radio a phone uses for contactless payment, or it can be built into a phone or computer. A passkey is a public-key credential that can sign someone in on its own, without a password first. The name comes from the FIDO Alliance, the industry group whose standards WebAuthn works with. A passkey can live on a security key or in the part of a phone, computer or password manager that stores credentials, called its credential provider.

Registering a key

Before Ava can sign in this way, the photo service has to register a credential to her account, usually while she is already signed in with her password. In WebAuthn the photo service is the relying party, the service that will rely on the result. It is the same name OpenID Connect gives an application that relies on a sign-in, used here for the website that relies on the authenticator.

When Ava chooses to add a passkey, the authenticator creates a new key pair. It returns the public key and a credential ID, an identifier the authenticator chose for this credential. The photo service checks the registration response, then stores both against Ava's account. A registration response can also include attestation, a signed statement about the authenticator's make and model. An organization that issues approved security keys to its staff can use it to accept only those models. Many passkeys provide none, and a service like the photo service usually doesn't ask.

A passkey is also a discoverable credential. The authenticator stores an account handle, the photo service's identifier for Ava's account, beside the private key. At sign-in it can find the right credential by itself, offer a choice if several accounts are saved for the site, and tell the photo service which account is signing in. That is why Ava didn't type an email address. A security key registered only as a second step after a password is often non-discoverable instead. The photo service first learns which account is signing in from the password step, then sends the credential IDs it stored, so the key can recognize its own credential.

Every credential is tied to one website. WebAuthn calls the domain the relying party ID, such as auth.photos.example. The browser also knows the page's origin, its scheme, host and port, and it only lets a page use credentials whose relying party ID matches that origin. A credential made for the photo service can't be requested by a page on another domain.

Adding a credential changes who can get into Ava's account. If someone briefly reached her signed-in browser, they shouldn't be able to add a passkey of their own. So the photo service asks for a recent sign-in, or a fresh one, before it registers a new credential, and tells Ava afterward that one was added.

Answering a challenge

At sign-in the photo service sends a challenge, the fresh random value from Secrets and key pairs that it has never used before. The browser passes the request to an authenticator, together with the origin of the page that asked. Once Ava completes the local check, the authenticator signs two things: its own authenticator data, which names the relying party and records what the authenticator checked, and a hash of data the browser supplied, which contains the challenge and the origin.

A passkey sign-in with local user verification. The private key, PIN, and biometric sample are not sent to the photo service.

The browser returns that signed response, called an assertion. The photo service checks that it answers the challenge it just sent, came from its own origin, names its relying party ID, and carries a valid signature from the public key registered to Ava's account. It also checks whether the authenticator performed any user verification its policy requires, which the next section explains. Each check closes a different gap: an old assertion fails the challenge, an assertion collected by another site fails the origin and relying party ID, and a response from an unregistered key fails the signature. A service uses a maintained WebAuthn library for these checks rather than writing them itself.

Now suppose Ava follows a link in a convincing message to auth.photos-example.net, a look-alike of the photo service's sign-in page. The page can ask the browser for a passkey, but the browser asks the authenticator only for credentials whose relying party ID matches photos-example.net. Ava has none, so her passkey for auth.photos.example is never offered, and there is nothing for the fake site to pass on to the real one. If the look-alike page had collected a password or a six-digit code instead, it could have relayed it in time. That website binding is what makes a passkey sign-in resistant to phishing, and it works without Ava noticing the difference between the two addresses.

Presence and verification

Authenticators can perform two different local checks. Touching a security key shows user presence: a person is there and taking part in this sign-in, so malware on the computer can't use the key silently. It says nothing about which person touched it. Anyone holding Ava's key could do the same.

A PIN or biometric check provides user verification: the authenticator confirms that the person is the one who set it up. The authenticator records both results as flags inside the authenticator data it signs, so the photo service can rely on them without seeing the fingerprint or the PIN. A passkey unlocked by Ava's fingerprint combines possession of the device with a biometric, and one unlocked by a PIN combines possession with knowledge. A touch alone is possession only.

Suppose the photo service's policy requires user verification, and an authenticator returns a valid signature after a touch alone, with the verification flag clear. The signature is genuine and the challenge is right, but the check the policy asked for didn't happen. The photo service must reject that sign-in.

auth.photos.example

Passkey offered
Yes
Local check
Fingerprint
Signature
Valid
User verification
Done

Accept

auth.photos-example.net

Passkey offered
No
Local check
Never asked
Signature
None made
User verification
Not reached

Nothing to relay

Verification required

Passkey offered
Yes
Local check
Touch only
Signature
Valid
User verification
Flag clear

Reject

The signature is genuine, yet the required local check did not happen.

Three answers to the photo service's challenge, checked on the same rows. Only the answer from the real sign-in page, after a fingerprint, is accepted.

Where keys live

A device-bound credential stays in one authenticator, such as a security key, and can't be copied out of it. A synced passkey is copied between Ava's devices by her credential provider, encrypted along the way, so the passkey she made on her phone also works on her laptop. Sync never sends the private key to the photo service, which still holds only the registered public key.

The two choices fail differently. Sync makes replacing a lost phone easy, because the passkey is waiting on the new one, but access to Ava's photos now depends partly on how well her credential provider account is protected and recovered. A device-bound key can't be copied by anyone, which also means losing it loses the credential, so Ava needs another way in, such as a second key registered as a backup.

A phone can also act as the authenticator for a different computer. When Ava signs in on a borrowed laptop, the laptop's browser shows a QR code, a square barcode her phone's camera can read. She scans it, and the two devices use Bluetooth to confirm that they are near each other before the phone answers the challenge. The passkey stays on the phone, and the borrowed laptop never holds it. The nearness check matters: a QR code shown on a fake page far away can't complete the exchange.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

Ava unlocks her passkey with a fingerprint to sign in to the photo service. What does the photo service check? 1 of 3

Choose one answer.

The photo service requires user verification. An authenticator returns a valid signature after a touch alone. What should happen? 2 of 3

Choose one answer.

Ava follows a link to auth.photos-example.net, a look-alike of the photo service's sign-in page, and chooses to sign in with a passkey. What happens? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity