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

Update getWebCrypto for Node 20 (Approach 2) #535

Closed MasterKale closed 8 months ago

MasterKale commented 9 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 smaller PR because getWebCrypto() remains asynchronous. No breaking API changes are made as a result of this work.

Fixes https://github.com/MasterKale/SimpleWebAuthn/issues/532.