PublicKeyCredentialDenormalizer is failing for me as my id and rawId are not base 64 encoded

Created on 4 December 2024, 18 days ago

Problem/Motivation

authenticateRequest() stopped working for me.

I looked into it and saw PublicKeyCredentialDenormalizer was base64 decoding the id and rawId, but my request looked like this:

{"id":"8v-wgrI6Wvmx9WIJCVHjOA","rawId":"8v-wgrI6Wvmx9WIJCVHjOA","response":{"authenticatorData":"SZYN5YgOjGh0NBcPZHZgW4_krrmihjLHmVzzuoMdl2MFAAAAAg","clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uZ2V0IiwiY2hhbGxlbmdlIjoibzJObjlodFJzOXBteWlGTEkxeW80ZyIsIm9yaWdpbiI6Imh0dHA6Ly9sb2NhbGhvc3Q6NTE3MyJ9","signature":"MEYCIQCNzlAN5G2KnK5g5T1MjacPGJmLIL0Cy1DTw4QrXByECAIhAKhoIz3mpBhmHQa6BboDM9vhI6v9KhvQKvGqXYbv15W6","userHandle":"OGQ1Yjc0MTYtZjY0Zi00Zjk5LWFiZTUtYjA2MzNkNjA3Yzg3"},"type":"public-key","clientExtensionResults":{},"authenticatorAttachment":"cross-platform"}

So base64 decoding this just results in some binary, e.g. ""�����:Z���b Q�8"

The source of the request is the output of simplewebauthn/browser startAuthentication().
I have run an npm update to ensure I'm using the latest libraries but it did not change anything for me.

Can you re-create this or are your id's base64 encoded?

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom dahousecat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dahousecat
  • 🇬🇧United Kingdom dahousecat

    My bad, I was still using vs 10.0.0 not 11 simplewebauthn/browser.
    Now a load of other things are broken instead but I assume once I fix bugs those I'll have some base64 encoded ids!

Production build 0.71.5 2024