web-auth / webauthn-framework

FIDO-U2F / FIDO2 / Webauthn Framework
MIT License
403 stars 53 forks source link

Fix to encode/decode credential id as base64url #631

Closed abcang closed 1 month ago

abcang commented 1 month 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 1 month ago

Many thanks!

abcang commented 1 month ago

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