Implement WebAuthn registration and authentication ceremonies server-side, including attestation and assertion verification, per the current W3C spec

domain: w3.org/TR/webauthn-3 · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. For registration, generate a random challenge server-side, call navigator.credentials.create() client-side with the relying party ID, user info, and supported public key algorithms, then send the resulting attestation object and client data back to the server.
  2. Server-side, verify the registration response: recompute and compare the challenge, verify the origin and relying-party-ID hash, parse the attestation statement format, and validate the certificate chain if your policy requires attestation trust.
  3. Store the credential's public key, credential ID, sign count, and supported transports against the user account once verification succeeds.
  4. For authentication, generate a new challenge and call navigator.credentials.get(); server-side, verify the assertion's signature against the stored public key, check challenge/origin/relying-party-ID match, and confirm the signature counter behavior.
  5. Use a maintained server-side WebAuthn library for your language rather than hand-rolling verification, since the spec defines many detailed checks across both ceremonies.

Known gotchas

Related routes

Implement server-side WebAuthn passkey registration and authentication ceremonies
w3.org/webauthn · 6 steps · unrated
Implement WebAuthn passkey registration ceremony on the web
w3c.github.io/webauthn · 6 steps · unrated
Implement WebAuthn passkey authentication ceremony on the web
w3c.github.io/webauthn · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans