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.63k stars 137 forks source link

feat/json-type-updates #400

Closed MasterKale closed 1 year ago

MasterKale commented 1 year ago

I just went through all the types JSON types in @simplewebauthn/typescript-types and matched them against the latest L3 draft and almost everything looks good:

Screenshot 2023-06-25 at 9 05 43 AM

...Except for missing additions of the "convenience values" publicKeyAlgorithm, publicKey, and authenticatorData on AuthenticatorAttestationResponseJSON. These values come from the correspondingly-named get...() methods on AuthenticatorAttestationResponse.

The types deviate a bit from what's in L3 because 1) L3 isn't the Recommendation yet, and 2) browser compatibility is still a little spotty (MDN says Firefox doesn't really support the getters):

This PR will return the values in the output from browser's startRegistration() when their corresponding getter methods are available.

Fixes #384.