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

VerifiedRegistrationResponse type missing transports attribute #491

Closed ladal1 closed 11 months ago

ladal1 commented 11 months ago

Describe the issue

Based on documentation in docs VerifiedRegistrationResponse is supposed to have attribute transports, however typescript types do not contain such attribute

Using: "@simplewebauthn/typescript-types": "8.3.4", "@simplewebauthn/server": "8.3.5",

MasterKale commented 11 months ago

Thanks for raising this @ladal1, this is a simple case of the docs having fallen out of sync with the library. In v7.0.0 transports got moved one level deeper, into response, to more accurately mirror data structures defined in WebAuthn.

I'll leave this open as a reminder to update the docs accordingly.

ladal1 commented 11 months ago

Yeah, I ended up using that by deduction myself, but wasn't sure if it's the documentation or the library, thanks 👍

MasterKale commented 11 months ago

I've updated the docs to pull transports from body.request.transports instead of the output of verifyRegistrationResponse() (I don't think they've ever been returned out of there 🤦):

https://simplewebauthn.dev/docs/packages/server#3-post-registration-responsibilities