Data encoding question #314
Replies: 1 comment
-
My decision to treat
No one complained so it's been that way ever since. |
Beta Was this translation helpful? Give feedback.
-
My decision to treat
No one complained so it's been that way ever since. |
Beta Was this translation helpful? Give feedback.
-
Hello,
In another thread I asked about cold start performance in Lambda. I've also been experimenting with the go-webauthn/webauthn fork of the DuoLabs Go library. That library doesn't have any client-side support, so I've been using SimpleWebAuthn/Browser with it. While working on that, I discovered a difference in how the UserHandle is encoded.
In SimpleWebAuthn/Browser, the UserHandle is encoded as a UTF8 string, while in go-webauthn/webauthn, it is encoded as URL-safe base64. Based on the w3c docs, these are all ArrayBuffers. For all of the others fields in this type, SimpleWebAuthn uses URL-safe base64. Only this one type seems to be handled differently. Links below to the specific lines of code and the section of the docs I was referring to.
I'm just curious if this was an intentional design choice, or just a difference between implementations. Other than this one type, the encodings seem to be pretty consistent. I'm able to work around it if this is by design.
Thanks,
Paul
https://github.com/MasterKale/SimpleWebAuthn/blob/master/packages/browser/src/methods/startAuthentication.ts#L93
https://github.com/go-webauthn/webauthn/blob/master/protocol/assertion.go#L35
https://w3c.github.io/webauthn/#dom-authenticatorassertionresponse-userhandle
Beta Was this translation helpful? Give feedback.
All reactions