{
  "id": 21104118,
  "title": "Decoding WebAuthn Passkey CBOR (attestationObject, authenticatorData, COSE Keys) Without a Backend",
  "url": "https://urgent.news/2026/11/21/decoding-webauthn-passkey-cbor-attestationobject-authenticatordata",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-21T20:21:51.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/dev_in_the_fog/decoding-webauthn-passkey-cbor-attestationobject-authenticatordata-cose-keys-without-a-backend-311j"
  },
  "original_language": "en",
  "account": "WebAuthn passkeys utilize a Base64URL-encoded CBOR blob known as attestationObject when created via navigator.credentials.create(). If a server verifier rejects registration due to RP ID hash mismatch, missing RP ID flag, or unsupported COSE algorithm, console.log output alone does not pinpoint the issue. This guide provides the exact binary layout to inspect before assuming server library problems.\n\nAfter decoding the Base64URL-encoded attestationObject, the CBOR map contains three keys: fmt (attestation statement format), attStmt (attestation signature map), and authData (raw authenticatorData byte buffer). The 37-byte authenticatorData header is consistent across WebAuthn registration and assertion. The first 32 bytes represent SHA-256 of the relying party ID, which must match the configured Relying Party ID. The 33rd byte contains flags indicating user presence, user verification, backup eligibility, backup state, and attested credential data.\n\nIf the hardware key requires user verification and is configured as \"required\" but lacks user verification (UV) flag, registration fails immediately. When the AT (attested credential data) bit is set, authData continues with a 16-byte aaguid (authenticator vendor/model identifier), a big-endian credentialIdLength, credentialId, and COSE key. The COSE key includes an algorithm identifier (-7 for ES256/P-256 or -257 for RS256). To avoid network exposure, a zero-upload browser inspector is available to parse CBOR, flags, AAGUID, and COSE keys locally.",
  "summary": "When implementing Passkeys (WebAuthn), navigator.credentials.create() hands back an opaque Base64URL-encoded CBOR blob called attestationObject . When a server verifier rejects a registration with RP ID hash mismatch , UV flag not set , or Unsupported COSE algorithm , console.log alone does not tell you which byte failed. Here is the exact binary layout to inspect before blaming your server…",
  "key_points": [
    "WebAuthn passkeys use CBOR blob attestationObject during creation",
    "Decoding reveals three keys: fmt, attStmt, and authData",
    "AuthenticatorData header is 37 bytes, contains SHA-256 of RP ID"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}