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

feat/server-esm-take-2-dnt #425

Closed MasterKale closed 1 year ago

MasterKale commented 1 year ago

This PR updates SimpleWebAuthn project to add the ability to use @simplewebauthn/server and @simplewebauthn/typescript-types for use in Deno. These packages will be maintained at the following URL:

https://deno.land/x/simplewebauthn

The NPM package output continues to support CommonJS and ECMAScript modules.

This should complete the goal of "adding ESM support to SimpleWebAuthn" as this PR ultimately unblocks use of this library in non-Node, ESM-first, Web-API-centric runtimes as well, like Deno, CloudFlare Workers, and Bun.

Supersedes PR #366 to address Issue #338.

Other Notes

Breaking Changes

  1. The following methods in @simplewebauthn/server are now async methods that return a Promise:
    • generateRegistrationOptions()
    • generateAuthenticationOptions()
    • generateChallenge() (in @simplewebauthn/server/helpers)