Passkeys are bound to the origin
A passkey signs a challenge for a specific site. A lookalike domain does not get an assertion it can reuse. That binding is the property to understand and to configure on purpose.
Diagram
From a challenge on your origin to an assertion
Step 1 of 4
Challenge
Your server creates a challenge and remembers it.
# The server sends a challenge. # The passkey ceremony is tied to the real origin. origin = "https://app.example"
The server stores the credential id and skips verification.
A different host could present a blob.
A session is issued anyway.
The example on the open step is one illustration, or the fix you can paste into an application you own.
What this page is made of
4 pieces. Each one says what fails, who is affected, what you would notice, and what you change.
The origin is the point
- What fails
- Passkeys exist so a phish of a password or a one-time code cannot be replayed on the real site. The authenticator includes the origin.
- Who is affected
- Account holders who would otherwise type a code into a lookalike.
- What you would notice
- A login that accepts a password and calls itself passkey-ready, or a verifier that does not check rpId.
- What you change
- Check origin and rpId against a list you configured. Do not take them from the request’s Host header.
The challenge is single-use
- What fails
- A challenge you do not store and delete can be replayed. A challenge taken from the client is not a challenge.
- Who is affected
- The account, if a captured assertion is accepted twice.
- What you would notice
- No server-side challenge row, or a challenge that lives for days.
- What you change
- Store the challenge, expire it in minutes, and delete it when it is used.
Registration is the other ceremony
- What fails
- Creating a passkey for an account that only has a phishable factor lets a phish enroll the attacker’s authenticator.
- Who is affected
- The account holder, who then loses the ability to sign in as themselves.
- What you would notice
- A “add passkey” button available with only a password session.
- What you change
- Require a recent phishing-resistant sign-in, or an existing passkey, before enrolling another.
What you still log
- What fails
- Log the credential id, the origin you expected, and success or failure. Do not log the assertion in a way that becomes a replayable blob in a support tool.
- Who is affected
- Operators, if a log becomes a second copy of a secret.
- What you would notice
- Debug middleware that stores the full ceremony body.
- What you change
- Log identifiers and results. Keep the signed bytes out of the ticket system.
The ceremony names your site
A passkey is a key pair. The private key stays in an authenticator. The public key stays on your server. When the person signs in, you send a challenge, and the authenticator signs it together with the origin it thinks it is talking to. A lookalike domain gets a signature for the lookalike, which your server should reject because the origin and the relying party id do not match the ones you configured.
That property is not magic dust on a password form. It is a set of checks. If you skip them and treat any blob as success, you have a login that sounds modern and verifies nothing. Use a current library, and still read which checks it performs. Configure the relying party id yourself. Do not derive it from the Host header the client sent.
Challenges and enrollment
Store the challenge server-side, tie it to the account or to the ceremony, expire it quickly, and delete it on use. A challenge the client invents is theater. A challenge that works twice is a replay. Counters, when the authenticator provides them, are there so a cloned authenticator is visible. Check them if you have them. Do not invent a bypass “for old keys” that skips the signature.
Enrollment is where phishing comes back. If a password session can register a new passkey, a real-time phish of the password can enroll the attacker’s device and then ignore the password. Require an existing passkey, or a recovery process you trust, before adding a credential. The recovery page is the pair to this one.
The session afterward is ordinary
A verified assertion earns a session. That session should still be short, rotated, and revocable. The passkey proved the person at a moment in time. It does not make a six-month refresh token a good idea. Issue the session with the cookie rules on the bearer-token page, and regenerate the id.
Log the credential id and the result. You will need that when someone says they did not sign in. You do not need the signed challenge sitting in a support attachment. The people affected by a skipped check are the account holders a lookalike was built to catch. The finding is the missing verification, not a walkthrough of a phish.
What you change
Adopt a maintained verification library. Configure origin and rpId. Store and burn challenges. Gate enrollment. Rotate the session on success. Add tests with a fixture assertion your test generates for the wrong origin and expect rejection. Do not point the test at a real person’s authenticator.
Read your platform’s current passkey guide when the library and the guide disagree. The guide wins for how the product behaves this year. The properties on this page — origin binding, a real challenge, enrollment that is not phishable — are what you are checking the guide for.
Check yourself
Recognition and the fix. Nothing here is a procedure.
A verifier issues a session from a passkey assertion without checking the relying party id. What failed?
Sibling techniques
Pages at the same depth, plus a lab and a glossary card for this one.