web-auth / webauthn-framework

FIDO-U2F / FIDO2 / Webauthn Framework
MIT License
423 stars 54 forks source link

Fix to encode/decode credential id as base64url #631

Closed abcang closed 4 months ago

abcang commented 4 months ago

Target branch: 4.9.x Resolves issue #

Previously, the id of the PublicKeyCredential obtained by the PublicKeyCredentialDenormalizer was a raw base64url encoded string sent by the browser. However, with change #589, it is now converted to a base64-encoded string. This pull request reverts this behavior back to the previous one.

Also, I think it is correct to decode if only $id is passed when creating an instance, so I fixed this as well.

Spomky commented 4 months ago

Many thanks!

abcang commented 4 months ago

Thank you for fixing my mistake and merging my pull request!