MasterKale / SimpleWebAuthn

WebAuthn, Simplified. A collection of TypeScript-first libraries for simpler WebAuthn integration. Supports modern browsers, Node, Deno, and more.
https://simplewebauthn.dev
MIT License
1.62k stars 137 forks source link

generateRegistrationOptions's `excludeCredentials` is returning empty string for each id #493

Closed rametta closed 11 months ago

rametta commented 11 months ago

Describe the issue

When using generateRegistrationOptions and providing some array for excludeCredentials, the id's are provided as a UInt8Array to the function, but the return type from the function has all the id's inside the exlcudeCredentials array to be an empty string

Reproduction Steps

  1. pass in an array for the excludeCredentials field in the generateRegistrationOptions, make sure every id is a UInt8Array type, like the library suggests
  2. observe the return type of the function providing each id to be an empty string

Expected behavior

The return type of generateRegistrationOptions should have the excludeCredentials array have the id not be an empty string, and instead be the proper credential id

Dependencies

SimpleWebAuthn Libraries

├── @simplewebauthn/browser@8.3.4
├── @simplewebauthn/server@8.3.5
├── @simplewebauthn/typescript-types@8.3.4
rametta commented 11 months ago

Never mind, I think the issue had to do with the way my cosmos db was serializing/deserializing the array buffer of credential id's