Closed h4gen closed 2 years ago
Hello @h4gen, I haven't had a lot of time to dive into this, but one thing that might be throwing things off is trying to use Buffer.from(..., 'base64')
to decode any values out of startRegistration()
. Base64URL is used exclusively in the public API of any of SimpleWebAuthn's methods, and so trying to decode these using base64 instead is probably not helping your attempts to manually peel apart these data structures.
I'm going to close this out, it's been three weeks without a response. Please feel free to re-open if you need to continue troubleshooting this.
Hi 👋
I have a very weird problem. I basically follow the instruction to decode the
attestationObject
and get thepublicKeyObject
. However, it does not seem to work for me. I am basically copying the code from the website, but it already starts with thecbor.decode
not being able to decode theattestationObject
. After a lot of trying I was able to get it working by encoding the object as Base64 buffer. If I don't do this the decoding fails with "data errors".The output looks like following:
So, the weird thing is that somehow my
publicKeyObject
looks again like myattestationObject
? Also the functiongetUint16
is supposed to have an offset parameter (see here)(This is currently wrong on the website). However this does also not change the behaviour for me. Any idea what is going on?One remark: It seems strange, that there is no convenient way to decode the whole attestation object and that the users have to do it themselves. Is there a reason?
Thank you so much for your help!
Best, Hagen