duo-labs / webauthn.io

The source code for webauthn.io, a demonstration of WebAuthn.
https://webauthn.io
BSD 3-Clause "New" or "Revised" License
635 stars 116 forks source link

Wrong variable name in the sample code for parsing the attestationObject on webauthn.guide #139

Open bNobo opened 1 month ago

bNobo commented 1 month ago

Thank you very much for webauth.guide web site which is great and explains webauthn very well.

I've noticed a little mistake in this sample code:

// note: a CBOR decoder library is needed here.
const decodedAttestationObj = CBOR.decode(
    credential.response.attestationObject);

console.log(decodedAttestationObject);

The variable is declared as decodedAttestationObj but console.log uses decodedAttestationObject which result to an "undefined variable" error.

I would have been happy to provide a pull request for this but I didn't found a repo for webauthn.guide, so I've created an issue here instead.