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

Update getWebCrypto for Node 20 (Approach 1) #533

Closed MasterKale closed 8 months ago

MasterKale commented 8 months ago

This PR updates getWebCrypto() to access globalThis.crypto exclusively since Node 20 supports this as a stable API access points. No attempts are made to import from node:crypto anymore.

This is a bigger PR because getWebCrypto() becomes synchronous, which spiders out into a few files that use WebCrypto. I hope I don't regret this...

Fixes #532.

MasterKale commented 8 months ago

Superseded by #535