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

Export algorithm-specific `COSEPublicKey` types in the server package #504

Closed mmv08 closed 10 months ago

mmv08 commented 10 months ago

The decodeCredentialPublicKey function signature returns a generic COSEPublicKey type, missing algorithm-specific properties. Exporting additional types would enable type casting to a specific public key type.

Perhaps it'd be handy to re-export the existing type guards, but I think plain types are enough because the developers should know which algorithm they used.

MasterKale commented 10 months ago

Hey @mmv08 thank you for the PR! I'll try and find time this weekend to merge this in and cut a release, thanks for your patience :)

mmv08 commented 10 months ago

Hey @mmv08 thank you for the PR! I'll try and find time this weekend to merge this in and cut a release, thanks for your patience :)

thank you for your tremendous work, sir :)

MasterKale commented 10 months ago

Hello @mmv08, sorry for the delay! These types should now be available for import in the newly-published @simplewebauthn/server@8.3.7 ✌️