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 library.
1. Unwrapping attestationObject
After Base64URL-decoding response.attestationObject , the CBOR map contains three keys:
fmt β attestation statement format ( "none" , "packed" , "apple" , "tpm" )
attStmt β attestation signature map
authData β raw authenticatorData byte buffer
2. The 37-Byte authenticatorData Header
Every WebAuthn registration and assertion starts with the same 37 bytes:
Bytes 0..31 (32B): SHA-256(rpId) β must match your configured Relying Party ID (e.g.β¦