You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+86-6Lines changed: 86 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,24 @@ OR
22
22
$ yarn add nest-oidc-provider oidc-provider
23
23
```
24
24
25
+
OR
26
+
27
+
```bash
28
+
$ pnpm add nest-oidc-provider oidc-provider
29
+
```
30
+
25
31
## Setup
26
32
33
+
> ⚠️ Version 8 of `oidc-provider`[is now ESM-only](<https://github.com/panva/node-oidc-provider/releases/tag/v8.0.0#:~:text=tokens%20(cb67083)-,oidc%2Dprovider%20is%20now%20an%20ESM%2Donly%20module,-(3c5ebe1)>), which is not yet supported by NestJS natively ([nest#7021](https://github.com/nestjs/nest/issues/7021), [nest#8736](https://github.com/nestjs/nest/pull/8736)). This library enables the use of the ESM-only version of `oidc-provider` for Node.js <= 20.17.x via dynamic imports. To avoid errors like [ERR_REQUIRE_ESM], all interfaces should be imported from this package, and the module should be accessed through dependency injection. Use `@InjectOidcModule()` to inject the `oidc-provider` module and `@InjectOidcProvider()` for the running instance. **You must not import anything directly from**`oidc-provider`, unless you're using Node.js >= 20.17.x with the experimental `--experimental-require-module` flag ([#54447](https://github.com/nodejs/node/pull/54447))!
34
+
35
+
### TypeScript
36
+
37
+
You need to install the `oidc-provider`@types package if you want to use the re-exported types from this library.
38
+
39
+
```bash
40
+
npm install @types/oidc-provider --save-dev
41
+
```
42
+
27
43
### Basic configuration
28
44
29
45
```ts
@@ -49,8 +65,9 @@ You can pass a `factory` function to customize the provider instantiation.
0 commit comments