1. [Home](https://quorumauth.com/) /
2. [Learn](https://quorumauth.com/learn/) /
3. What is WebAuthn?

Learn · QuorumAuth

# What is WebAuthn?

> WebAuthn (Web Authentication) is the W3C browser API behind passkeys and FIDO2. How its ceremonies work, and what servers must verify on each response.

WebAuthn, short for Web Authentication, is the W3C standard browser API that lets websites register and verify public-key credentials, such as passkeys and security keys, instead of passwords.

Updated November 14, 2026

WebAuthn is the set of rules a web browser follows to talk to the key keeper in your phone, laptop or security key. The website asks the browser, the browser asks the key keeper, and the key keeper only answers if you approve and the site is the one the key was made for. The browser also writes the site's real address into what gets signed, so a look-alike site's answer does not check out.

On this page

1. WebAuthn, FIDO2 and passkeys: how they fit
2. How WebAuthn works
3. What the server must check
4. When to use WebAuthn
5. Pitfalls
6. How QuorumAuth handles WebAuthn

Registration ceremony

1. 1 Server → Browser Challenge and creation options
2. 2 Browser → Authenticator credentials.create()
3. 3 Authenticator → Authenticator Check user, make key pair One key pair for this relying party
4. 4 Authenticator → Browser Credential ID and public key
5. 5 Browser → Server Return the credential
6. 6 Server → Server Verify, store public key

The server sends a random challenge and creation options to the browser. The browser calls navigator.credentials.create(). The authenticator checks user presence, and user verification if asked, then creates a key pair for that relying party. It returns the credential ID and public key, the browser passes them to the server, and the server verifies the response and stores them against the user.

Registration creates a key pair for one relying party; the server keeps only the credential ID and public key.

WebAuthn is the piece of the web platform that makes passwordless sign-in possible. Published by the W3C as the Web Authentication specification, it gives JavaScript two calls, `navigator.credentials.create()` and `navigator.credentials.get()`, that ask an authenticator to make or use a public-key credential scoped to one website. Together with the FIDO Alliance’s Client to Authenticator Protocol (CTAP), it forms what is known as FIDO2.

## WebAuthn, FIDO2 and passkeys: how they fit

Several names describe one system at different layers:

| Name | What it is | Published by |
| --- | --- | --- |
| WebAuthn | The browser API a website calls to create and use credentials | W3C: Level 1 Recommendation in 2019, Level 2 in 2021 |
| CTAP | The protocol between the browser or operating system and an external authenticator, over USB, NFC or Bluetooth | FIDO Alliance |
| FIDO2 | The umbrella name for WebAuthn plus CTAP | FIDO Alliance with the W3C |
| Passkey | The credential itself: a FIDO key pair, synced across devices or bound to one | FIDO Alliance and platform vendors |

So adding passkeys to a website means using WebAuthn: the [passkey](https://quorumauth.com/learn/what-is-a-passkey/) is what the user holds, WebAuthn is how your site asks for it. If the passkeys are meant to replace authenticator-app codes, [TOTP vs passkeys](https://quorumauth.com/learn/totp-vs-passkeys/) covers what to require, and for whom.

## How WebAuthn works

WebAuthn defines two **ceremonies**, each a round trip between your server (the relying party), the browser, and an authenticator.

### Registration ceremony

1. The server generates a random challenge and sends creation options: the relying party ID and name, the user handle, accepted algorithms, and preferences such as whether the credential should be discoverable.
2. The browser calls `navigator.credentials.create()`.
3. The authenticator checks user presence, and user verification if asked, then creates a key pair for that relying party.
4. The browser returns the credential ID, the public key, the authenticator data, and an optional attestation statement.
5. The server verifies the response and stores the credential ID and public key against the user.

```
const credential = await navigator.credentials.create({
  publicKey: {
    challenge,
    rp: { id: "example.com", name: "Example" },
    user: { id: userHandle, name: "ada@example.com", displayName: "Ada" },
    pubKeyCredParams: [{ type: "public-key", alg: -7 }], // ES256
    authenticatorSelection: {
      residentKey: "required",
      userVerification: "required",
    },
  },
});
```

### Authentication ceremony

1. The server sends a fresh challenge, and optionally the credential IDs it will accept. Leaving the list empty asks for a **discoverable** credential, so the user need not type a username.
2. The browser calls `navigator.credentials.get()`.
3. The authenticator signs the authenticator data and a hash of the client data, which includes the challenge and the origin.
4. The server verifies the signature with the stored public key.

Authentication ceremony

1. 1 Server → Browser Fresh challenge Empty credential list: discoverable
2. 2 Browser → Authenticator credentials.get()
3. 3 Authenticator → Browser Signs challenge and origin
4. 4 Browser → Server Return the signature
5. 5 Server → Server Verify with stored public key

The server sends a fresh challenge, and optionally the credential IDs it accepts; an empty list asks for a discoverable credential. The browser calls navigator.credentials.get(). The authenticator signs the authenticator data and a hash of the client data, which includes the challenge and origin. The browser returns the signature and the server verifies it with the stored public key.

The signature covers the challenge and the origin, so it only verifies for the real site and only once.

## What the server must check

A WebAuthn implementation is only as safe as its verification. For each response the relying party should confirm:

| Check | Why it matters |
| --- | --- |
| Challenge matches one it issued, and is used once | Stops replay |
| `origin` in client data is an expected origin | Stops phishing through look-alike sites |
| RP ID hash in authenticator data matches its RP ID | Binds the credential to the site |
| User presence flag set; user verification flag set if required | Proves a person approved, with biometric or PIN if required |
| Signature verifies against the stored public key | Proves possession of the private key |
| Signature counter, where the authenticator reports one | Can flag a cloned credential |
| Credential ID not already registered (at registration) | Prevents one authenticator being bound twice |

Use a maintained server library rather than parsing CBOR and COSE keys by hand.

## When to use WebAuthn

Use WebAuthn for any sign-in or step-up where phishing resistance matters: workforce access, administrator actions, customer accounts. It serves both as a first factor, with [passkeys](https://quorumauth.com/learn/what-is-a-passkey/), and as a second factor after a password. See [passkeys vs passwords](https://quorumauth.com/learn/passkeys-vs-passwords/) for the trade-offs, and [TOTP](https://quorumauth.com/learn/what-is-totp/) for the code-based alternative it usually replaces.

## Pitfalls

- **Challenges that can be reused.** Store issued challenges server-side and consume them once, across every replica.
- **Wrong RP ID.** Choosing `app.example.com` as the RP ID means the credential will not work on `example.com`. Choose the registrable domain you intend to keep.
- **Treating attestation as required.** A service that does not restrict which authenticators users may use has no need for attestation; demanding it can block legitimate authenticators.
- **Not asking for user verification** when the credential is the only factor.
- **Confusing errors.** A user who cancels the browser prompt and a server that is unreachable are different failures and should read differently.

## How QuorumAuth handles WebAuthn

QuorumAuth exposes WebAuthn registration and authentication ceremonies through its SDK and sign-in UI. In its tested behaviour:

- Beginning registration returns browser creation options and requires a signed-in user. Finishing registration requires the same user who began it, stores verified authenticator material, rejects malformed attestation, and rejects a duplicate authenticator.
- Beginning authentication returns discoverable request options. Finishing it issues a session token, and rejects malformed or untrusted assertions.
- Challenges are single-use: a duplicate challenge or callback in the operator device flow is rejected, and an assertion made for a challenge never issued is refused.
- Passkeys that did not verify the user, or whose counter did not advance, do not admit a switch between organizations.
- In the browser, a failed enrollment stays recoverable, and an unreachable credential service is not reported as a cancelled ceremony.

Rather not build these ceremonies yourself? [Drop-in sign-in components run them for you](https://quorumauth.com/onboarding/), passkey enrollment included.

## Frequently asked questions

What is the difference between WebAuthn and FIDO2?

FIDO2 is the umbrella. It combines W3C WebAuthn, the browser API, with the FIDO Alliance's CTAP, the protocol between the browser and an external authenticator.

Is WebAuthn the same as passkeys?

Passkeys are the credentials. WebAuthn is the API a website uses to create and use them.

Does WebAuthn need a hardware key?

No. Phones, laptops, and password managers act as authenticators. Hardware security keys are one option among several.

What must the server verify?

The challenge, the origin, the relying party ID hash, the user presence and verification flags, the signature, and, where used, the signature counter.

## Related reading

[Learn QuorumAuth What is a passkey?A passkey replaces a password with a key pair held on your device. Learn how passkeys work, why they resist phishing, and what to plan for in rollout.Read](https://quorumauth.com/learn/what-is-a-passkey/) [Learn QuorumAuth TOTP or passkeys: what to require, and what to keep Passkeys resist phishing; TOTP codes can be relayed. A guide to which to require for each user group, and a rollout that tightens policy without lockouts.Read](https://quorumauth.com/learn/totp-vs-passkeys/) [Learn QuorumAuth Passkeys vs passwords Passkeys vs passwords compared on phishing, breaches, reuse and recovery, with password plus TOTP as the middle ground and a plan to move users to passkeys.Read](https://quorumauth.com/learn/passkeys-vs-passwords/) [Learn QuorumAuth What is TOTP?TOTP stands for time-based one-time password: a six-digit code computed from a shared secret and the clock (RFC 6238). How it works, and TOTP vs HOTP.Read](https://quorumauth.com/learn/what-is-totp/) [Learn QuorumAuth What is zero trust authentication?Zero trust authentication verifies every user and workload on every request, instead of trusting the network. Principles, architecture and pitfalls.Read](https://quorumauth.com/learn/what-is-zero-trust-authentication/)

## Talk to sales about QuorumAuth.

QuorumAuth is sold through our sales team. The Build page shows the drop-in sign-in on your origin and how to reach sales about your stack.

[Go to Build and contact sales →](https://quorumauth.com/onboarding/)
