Skip to content

Commit

Permalink
Add warning about WebCrypto in Node v18
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Apr 1, 2024
1 parent ad0450d commit f190f82
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ A strategy to use and implement OAuth2 framework for authentication with federat
npm add remix-auth-oauth2
```

> ![WARNING]
> If you're using versions of Node.js previous to v20, you will need to make the WebCrypto API globally available to use this package.
>
> ```ts
> import { webcrypto } from "node:crypto";
> globalThis.crypto = webcrypto;
> ```
>
> Or enable the experimaental flag `--experimental-global-webcrypto` when running your process.
> For v20 or greater, this is not necessary.
### Directly
You can use this strategy by adding it to your authenticator instance and configuring the correct endpoints.
Expand Down

0 comments on commit f190f82

Please sign in to comment.