Execute the WebAuthn authentication ceremony client-side using navigator.credentials.get and verify the assertion server-side

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

Steps

  1. Fetch a fresh server-generated challenge from your backend; associate it with the user's session and set a short expiry (e.g. 60 seconds).
  2. Construct PublicKeyCredentialRequestOptions with the challenge, rpId, userVerification preference, and allowCredentials listing the credential IDs registered for the user.
  3. Call navigator.credentials.get({ publicKey: options }) and await the PublicKeyCredential assertion.
  4. Send response.id, response.response.clientDataJSON, response.response.authenticatorData, and response.response.signature to the server.
  5. Server verifies: parse and decode clientDataJSON (type must be 'webauthn.get', challenge matches and is consumed, origin matches), compute rpIdHash and compare with authenticatorData bytes, verify the UP bit is set, check UV bit against policy, then verify the signature over authenticatorData + hash(clientDataJSON) using the stored public key.
  6. Check the authenticatorData signCount: if it is greater than the stored count update it; if it is less than or equal (and neither is zero) flag possible authenticator cloning and consider requiring re-enrollment.

Known gotchas

Related routes

Execute the WebAuthn registration ceremony client-side using navigator.credentials.create with PublicKeyCredentialCreationOptions
w3.org · 6 steps · unrated
Implement WebAuthn registration and authentication ceremonies server-side, including attestation and assertion verification, per the current W3C spec
w3.org/TR/webauthn-3 · 5 steps · unrated
Implement server-side WebAuthn passkey registration and authentication ceremonies
w3.org/webauthn · 6 steps · unrated

Give your agent this knowledge — and 16,300+ more routes

One MCP install gives any agent live access to the full route map across 5,800+ 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