Passkeys replace passwords with a key pair: your device keeps the secret, and the website only stores a public key that is useless to attackers.
Passwords have been the main way to log in for more than sixty years, and they fail in the same ways every year. People reuse them, phishing pages collect them, and when a company's database leaks, millions of them leak with it. Two-factor codes helped, but a good phishing page can ask for the code too.
Passkeys take a different approach. There is no shared secret at all. Your device creates a key pair for each website, keeps the private key to itself, and proves who you are by signing a challenge. The website keeps only the public key. And because the browser checks which website is asking, a passkey simply does not work on a fake site.
This article explains how passkeys work underneath and what the standards WebAuthn, CTAP and FIDO2 do. It shows why passkeys stop phishing, where they are stored, what changed with WebAuthn Level 3 in 2026, and how to add them to your own application. It builds on How HTTPS Really Works, which explains digital signatures, and OAuth 2.0, OpenID Connect and JWT, which explains what happens after the login.
1. Why Passwords Keep Failing
A password is a shared secret: you know it, and the server knows it (or a hash of it). Every weakness of passwords follows from that:
- Phishing. A fake login page looks like the real one, and you type the secret into it. The attacker now knows what the server knows.
- Reuse. Most people use the same few passwords on many sites. One leak opens many accounts ("credential stuffing").
- Server leaks. The server must store something that can check your password. If the database leaks, attackers crack the weak hashes offline.
- Guessing. Short or common passwords fall to automated guessing.
Two-factor authentication with SMS or app codes helps against leaks and guessing, but not against good phishing. A real-time phishing kit simply forwards your password and your code to the real site, within seconds. The phishing article on this blog describes how common that is.
The core problem is that the user has to type a secret into a page, and the user cannot reliably tell a real page from a fake one. Passkeys remove both problems: there is nothing to type, and the browser, not the human, checks the website.
2. The Idea: A Key Pair Instead of a Secret
A passkey is built on public-key cryptography, the same idea that secures HTTPS:
- The private key can create signatures. It never leaves your device or your password manager.
- The public key can only check signatures. It can be given to anyone without risk.
Logging in becomes a short exchange:
1. Website → browser: "Prove it's you. Sign this random challenge: 7f3a…e91c"
2. Your device: asks you to unlock (fingerprint, face or device PIN)
3. Device → website: signature over the challenge and the website's address
4. Website: checks the signature with the stored public key → logged in
What the website stores per user is a public key and an ID. If its database leaks, the attacker gets public keys that cannot be used to log in anywhere. There is no hash to crack and nothing to reuse on other sites, because every site gets its own key pair.
The fingerprint or face scan in step 2 never leaves your device. It only unlocks the private key locally. The website never sees biometric data; it only learns that the user was verified.
3. A Short History
| Year | Event |
|---|---|
| 2012–2013 | FIDO Alliance founded by PayPal, Lenovo and others to replace passwords with public-key login |
| 2014 | FIDO U2F: security keys as a second factor, first deployed widely at Google |
| 2019 | WebAuthn Level 1 becomes a W3C Recommendation; together with CTAP it forms FIDO2 |
| 2021 | WebAuthn Level 2 becomes a W3C Recommendation |
| May 2022 | Apple, Google and Microsoft commit to support synced FIDO credentials across their platforms |
| Sep 2022 | Apple ships passkeys in iOS 16; the name "passkey" becomes the industry term |
| 2023 | Google lets all accounts sign in with passkeys and later makes them the default; password managers add passkey support |
| 2025 | Microsoft makes passkeys the default for new consumer accounts; FIDO publishes the Credential Exchange Format for moving passkeys between providers |
| Aug 2026 | WebAuthn Level 3 becomes a W3C Recommendation |
The technology is more than ten years old. What changed after 2022 was syncing: before, a FIDO key was stuck on one device or one hardware key, and losing it meant losing access. Synced passkeys made public-key login practical for normal users.
According to the FIDO Alliance, billions of passkeys were in use by 2026. Its consumer survey found that most people know the term, and many have turned passkeys on for at least some of their accounts. Passwords are not gone, but for large services passkeys have become an everyday login method.
4. The Vocabulary
A few terms come up everywhere. Here they are in one place.
| Term | Meaning |
|---|---|
| Passkey | A FIDO credential (key pair) for one website, usable instead of a password |
| Relying party (RP) | The website or app that wants to log you in |
| RP ID | The domain a passkey belongs to, for example example.com |
| Authenticator | Whatever holds the private key: your phone, laptop, password manager or a hardware security key |
| Platform authenticator | Built into the device (Touch ID, Windows Hello, Android) |
| Roaming authenticator | Separate from the device: a USB/NFC security key, or a phone used for another device |
| Synced passkey | Copied between your devices by a provider such as iCloud Keychain, Google Password Manager or a password manager |
| Device-bound passkey | Never leaves one device or security key; common in high-security environments |
| WebAuthn | The W3C browser API websites use to create and use passkeys |
| CTAP | The FIDO protocol between the browser or OS and an external authenticator (USB, NFC, Bluetooth) |
| FIDO2 | The combination of WebAuthn and CTAP |
The important point for developers: your website only talks WebAuthn. Everything between the browser and the authenticator is handled by the browser and the operating system.
5. Registration: Creating a Passkey
A user who is already signed in (or is signing up) clicks "Create a passkey". Here is what happens.
1. The server prepares options. It creates a random challenge and sends it together with information about the site and the user:
{
"challenge": "dGhpcy1pcy1hLXJhbmRvbS1jaGFsbGVuZ2U",
"rp": { "id": "example.com", "name": "Example Shop" },
"user": { "id": "dXNlci00Mg", "name": "anna@example.com", "displayName": "Anna" },
"pubKeyCredParams": [{ "type": "public-key", "alg": -7 }, { "type": "public-key", "alg": -257 }],
"authenticatorSelection": { "residentKey": "required", "userVerification": "preferred" },
"excludeCredentials": []
}
A few fields need a word of explanation:
user.idis a random ID, not the email address, so the passkey does not carry personal data.alglists the signature algorithms the site accepts: -7 is ECDSA with P-256 and SHA-256, used by most authenticators; -257 is RSA, which Windows Hello uses. That is why sites list both.residentKey: "required"creates a discoverable credential: the passkey itself remembers the account, so the user does not have to type a username later.excludeCredentialslists passkeys the user already has, so the same device is not registered twice.
2. The browser asks the authenticator. The page passes the options to the WebAuthn API:
const options = PublicKeyCredential.parseCreationOptionsFromJSON(await fetchOptions());
const credential = await navigator.credentials.create({ publicKey: options });
await sendToServer(credential.toJSON());
The browser shows its own dialog: "Create a passkey for example.com?". The user confirms with a fingerprint, face or PIN. The authenticator creates a new key pair just for this site and this account.
3. The server stores the public key. The response contains the new credential ID, the public key and data about the authenticator. The server checks three things: the challenge is the one it sent, the origin is its own website, and the flags are as expected. Then it stores:
- credential ID
- public key
- user ID it belongs to
- signature counter
- backup flags (can this passkey be synced, and is it?)
- optionally the authenticator model (AAGUID) and a name the user can recognise, like "iCloud Keychain"
No password, no hash, nothing secret.
6. Login: Using a Passkey
Login uses the stored public key to check a fresh signature.
1. The server sends a new challenge. For a discoverable passkey it does not need to know who the user is yet.
2. The browser asks for a signature. The best user experience is conditional mediation: the passkey appears as a suggestion in the username field's autofill, next to saved passwords.
<input type="text" name="username" autocomplete="username webauthn">
const options = PublicKeyCredential.parseRequestOptionsFromJSON(await fetchLoginOptions());
const assertion = await navigator.credentials.get({ publicKey: options, mediation: "conditional" });
await sendToServer(assertion.toJSON());
The user taps the suggestion, unlocks with a fingerprint, face or PIN, and is in. There is no "passkey or password?" decision to make. Many sites also show a separate "Sign in with a passkey" button, which calls the same API without mediation and opens the browser's passkey dialog directly.
3. The authenticator signs. It signs the challenge together with the origin of the page, for example https://example.com. It also signs a few flags: was the user present, and was the user verified with biometrics or a PIN.
4. The server verifies. It looks up the public key by credential ID, checks the signature, the challenge, the origin and the flags, and starts a normal session. From here on, nothing is different from any other login: a session cookie or the tokens described in the OAuth article.
7. Why Passkeys Stop Phishing
This is the most important property, and it comes from two rules the user cannot break, even by mistake.
A passkey belongs to one domain. It is created for an RP ID like example.com. The browser only offers it on example.com and its subdomains.
The browser writes the real address into what gets signed. The signed data contains the origin of the page that asked. The browser fills it in from the address bar, so the page cannot fake it.
Now imagine a phishing page at examp1e-login.com that looks exactly like the real shop:
Password world:
fake page asks for password → user types it → attacker logs in on the real site ✗
Passkey world:
fake page asks for a passkey → browser has no passkey for examp1e-login.com → nothing to offer
even if the fake page relays the real site's challenge, the signature contains
"origin: https://examp1e-login.com" → the real server rejects it ✓
The user does not need to notice the fake address. The protection does not depend on attention, training or a careful look at the URL bar. That is why security agencies and the FIDO Alliance call passkeys phishing-resistant, a label that SMS and app codes do not get.
8. Where Passkeys Live
Synced passkeys
Most passkeys today are synced by a credential manager: iCloud Keychain on Apple devices, Google Password Manager on Android and Chrome, and password managers such as 1Password, Bitwarden or Dashlane. Create a passkey on your phone, and it is available on your laptop a moment later.
The sync is end-to-end encrypted: the provider stores the passkeys, but encrypted with keys it does not have. That is the same zero-knowledge design described in the 1Password article, and it is why a breach at the provider does not automatically expose your passkeys. The trade-off is clear, though: your passkeys are as safe as your account at the sync provider. Protect that account well, including its own recovery options.
Using a passkey from another device
What if you want to log in on a computer that does not have your passkey, like a colleague's laptop? WebAuthn has a cross-device flow for this. The laptop shows a QR code, and you scan it with your phone. The phone checks over Bluetooth that it is physically close to the laptop, and then signs the login. The passkey never leaves the phone, and the Bluetooth check stops a remote attacker from using a QR code they captured.
Moving passkeys between providers
Early on, passkeys were hard to move from one credential manager to another. The FIDO Alliance has since published the Credential Exchange Format (CXF) and the Credential Exchange Protocol (CXP). Together they define a secure, encrypted way to export passkeys from one provider and import them into another. Credential managers have started to support it, so switching from one password manager to another no longer means creating every passkey again.
Security keys
Hardware security keys (USB, NFC) hold device-bound passkeys that never leave the key. They are the strongest option and are common for administrators, journalists and high-risk accounts. Their weakness is the same as their strength: lose the key without a backup, and the passkey is gone.
9. What WebAuthn Level 3 Changed
WebAuthn Level 3 became a W3C Recommendation in August 2026. Most of its features had already shipped in browsers; the Recommendation makes them official. The ones that matter in practice:
- Backup flags. Every passkey reports whether it can be synced (backup eligible) and whether it is synced (backup state). A site can use this to decide whether to keep pushing for a second login method: a synced passkey survives a lost phone, a device-bound one does not.
- Authenticator names without attestation. A credential manager can tell the site which product it is (its AAGUID) without the heavier attestation process. Sites use this to show "iCloud Keychain" or "Bitwarden" next to each passkey in the account settings, so users know which one is which.
- Related origins. A company with several domains, for example
example.comandexample.de, can declare them as related, so one passkey works on all of them. - JSON helpers.
parseCreationOptionsFromJSON,parseRequestOptionsFromJSONandtoJSONconvert between the API's binary data and JSON. Before, every project wrote its own Base64URL conversion code. - Signals. A site can tell the credential manager that a passkey was deleted on the server, or that the user's name changed, so the user does not keep seeing stale passkeys in the autofill list.
10. Adding Passkeys to Your Site
Use a library
Do not implement the verification yourself. Parsing CBOR, checking signatures in several algorithms and validating flags is exactly the kind of code where small mistakes become security holes. Mature libraries exist for every common stack:
| Stack | Library |
|---|---|
| JavaScript / TypeScript | SimpleWebAuthn (server and browser) |
| Java / Spring | Spring Security (built-in passkey support since 6.4), WebAuthn4J, Yubico java-webauthn-server |
| Python | py_webauthn |
| Go | go-webauthn |
| .NET | ASP.NET Core Identity (passkey support since .NET 10), fido2-net-lib |
If you use an identity provider such as Keycloak, Auth0, Okta or Entra ID, passkeys are usually a configuration option, and your application keeps using OpenID Connect as before.
Server checklist
- Generate a fresh random challenge for every registration and login, store it server-side with a short lifetime, and use it once.
- Check the origin and RP ID in every response against your real domain.
- Require user verification where it matters, so the passkey acts as two factors in one: something you have (the device) and something you are or know (biometrics or PIN).
- Store passkeys per user as a list. Users will have several: phone, laptop, security key.
- Let users see, name and delete their passkeys in the account settings, with the date of creation and last use.
- Use the backup flags to show a hint like "Add a second passkey or a recovery method" when the only passkey is device-bound.
- Do not rely on the signature counter for synced passkeys. It was meant to detect cloned security keys, but synced passkeys usually report 0.
Rolling it out
The usual path that works:
- Offer passkeys after a successful password login: "Sign in faster next time with a passkey?" This is when users are most willing.
- Enable conditional mediation on the login form, so existing passkeys appear in the autofill.
- Keep the old login method as a fallback at first, and measure how many logins use passkeys.
- Plan account recovery before you remove passwords for anyone.
11. Honest Limits
Passkeys solve the biggest problem of passwords. They do not solve every problem.
- Account recovery becomes the weak point. If a user can reset access with an email link or an SMS code, attackers will target that path instead. A passkey is only as strong as the weakest way to get into the account without it.
- Passkeys protect the login, not the session. Malware that steals the session cookie after login (infostealers) bypasses any login method. Short session lifetimes and binding sessions to devices help; passkeys alone do not.
- Trust moves to the credential manager. Synced passkeys depend on the security of the Apple, Google or password manager account that syncs them.
- Shared and borrowed devices are awkward. The cross-device QR flow works, but many users do not know it exists.
- User understanding lags behind. "Passkey" means different things in different apps, and dialogs differ between platforms. Clear wording on your own pages helps a lot.
- Enterprise requirements differ. Companies that must know exactly which hardware holds a key use attestation and device-bound passkeys, which brings back some of the old complexity.
None of these is a reason to wait. They are reasons to think about recovery, sessions and communication when you introduce passkeys.
12. Passkeys, OAuth and JWT: How the Pieces Fit
Passkeys answer one question: who is this user, right now, at this device? Everything after that stays the same.
User ──passkey──► Identity provider (login) ──OpenID Connect──► Your app ──access token (JWT)──► APIs
In a typical setup, the passkey is used at the login step of the identity provider. The identity provider then issues the usual ID token and access token to your application through OpenID Connect. Your APIs keep validating JWTs exactly as before. That is the good news for existing systems: adding passkeys changes the front door, not the whole building.
13. For Users: How to Start
If you want to use passkeys yourself:
- Start with your most important accounts: email, your Apple, Google or Microsoft account, your password manager, banking where offered.
- Look for "Passkeys" or "Sign-in options" in the security settings of each service.
- Pick one credential manager that works on all your devices, so your passkeys follow you.
- Create a second passkey or keep a recovery method for important accounts, for example on a second device or a security key.
- Keep your old password for now where you cannot remove it, but stop typing it: let the passkey do the work.
14. Conclusion
Passkeys are not a small improvement to passwords. They replace a shared secret with a signature, and they move the decision "is this the real website?" from the human to the browser.
- No shared secret: the website stores only a public key, so a database leak gives attackers nothing they can log in with.
- Phishing-resistant by design: passkeys are bound to a domain, and the signed data contains the real origin.
- WebAuthn is the API for websites; CTAP and the operating system handle the authenticators.
- Synced passkeys made the technology usable for everyone; their security depends on the sync provider's account.
- WebAuthn Level 3 (2026) standardised backup flags, authenticator names, related origins, JSON helpers and signals.
- For developers, the work is manageable with a library: challenges, origin checks, a list of passkeys per user and a good recovery path.
The easiest way to see passkeys in action is a demo site such as webauthn.io. Create a passkey, sign in with it, and look at the data the browser sends. Then add a passkey to your own most important account today.
Sources and Further Reading
- W3C, Web Authentication: An API for accessing Public Key Credentials Level 3, Recommendation, August 2026: https://www.w3.org/TR/webauthn-3/
- W3C News, "Web Authentication Level 3 is now a W3C Recommendation", 2026: https://www.w3.org/news/2026/web-authentication-an-api-for-accessing-public-key-credentials-level-3-is-now-a-w3c-recommendation/
- FIDO Alliance, Client to Authenticator Protocol (CTAP): https://fidoalliance.org/specifications/
- FIDO Alliance, Credential Exchange Format (CXF): https://fidoalliance.org/specs/cx/cxf-v1.0-ps-20250814.html
- FIDO Alliance, The State of Passkeys 2026: https://fidoalliance.org/the-state-of-passkeys-2026/
- FIDO Alliance, Passkey Index 2026: https://fidoalliance.org/passkey-index-2026/
- passkeys.dev, developer guidance by the FIDO Alliance and W3C community: https://passkeys.dev/
- Spring Security reference, Passkeys: https://docs.spring.io/spring-security/reference/servlet/authentication/passkeys.html
- SimpleWebAuthn: https://simplewebauthn.dev/
- WebAuthn demo: https://webauthn.io/




