oidc-provider is a comprehensive OAuth 2.0 Authorization Server implementation that includes full support for OpenID Connect 1.0, designed for Node.js environments. Currently stable at version 9.8.2, the library maintains an active release cadence with frequent minor and patch updates, often incorporating new features and specification compliance. Its key differentiators include extensive OpenID Certification across various profiles (e.g., Basic, Implicit, Hybrid, FAPI 1.0/2.0, CIBA), a wide array of implemented OAuth 2.0 and OIDC specifications (PKCE, JAR, PAR, DPoP, MTLS, Device Flow, Dynamic Client Registration, Back-Channel/RP-Initiated Logout, Token Introspection/Revocation, Resource Indicators, JARM, CIMD), and a highly configurable architecture that allows for custom storage adapters and interaction flows. It provides the core OIDC server logic, leaving UI and storage implementation to the developer, offering flexibility but also requiring careful custom integration.
npm install oidc-providerVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the instantiation of a basic OIDC Provider with a minimal in-memory adapter and client configuration, emphasizing the critical need for a persistent storage adapter, custom interaction UI, and securely managed JWKS for any production deployment. It illustrates the core `Provider` class and essential configuration structure.
Migrate your project to use ES Modules (`import`/`export`), ensure Node.js >= 16, and update your custom Adapter implementations to conform to the new interface. Refer to the v8 migration guide for detailed instructions.
Review your `Provider` configuration, especially the `features` and `claims` properties, and update your custom Adapter implementation methods if necessary. Consult the v9 changelog for specific changes.
When using experimental features, consider pinning `oidc-provider` with a `~` (tilde) operator (e.g., `"oidc-provider": "~9.7.0"`) in your `package.json` to avoid unexpected breaking changes, or carefully review changelogs for minor version updates that affect experimental features.
Implement a secure, persistent storage adapter (e.g., for PostgreSQL, MongoDB, Redis) and a fully functional user interaction UI that handles login, consent, and other OIDC flows. The provided in-memory adapter is strictly for development and cannot be used in production.
Generate strong, unique JWKS keys for each environment. Never hardcode private keys in source code for production. Implement a robust key management strategy using a Key Management System (KMS) or secure secret management service for storage and rotation.
It is highly recommended to run `oidc-provider` on Node.js 18 or newer to ensure full compatibility, optimal performance, and to avoid potential issues related to missing native `fetch` or other web platform APIs.
Ensure your project is configured for ES Modules by setting `"type": "module"` in `package.json` or by using `.mjs` file extensions, and update `require()` calls to `import` statements.
Verify that your custom adapter class implements all required methods for the `Adapter` interface (check the `oidc-provider` documentation for the current interface) and that it is correctly passed in the `adapter` configuration option of the `Provider` constructor.
Ensure your `interactions.url` function correctly accepts `ctx` and `interaction` arguments and returns a valid string URL. The `interaction` object contains properties like `uid` (a string) and not a function. Check the documentation for the `Interaction` object structure.
Ensure `new Provider(...)` is called with valid arguments before accessing `provider.callback()`. The `provider.callback()` method should be correctly invoked as a middleware function (e.g., `app.use(provider.callback());` with Express/Koa).
Verify that the client's `jwks` (or `jwks_uri`) configuration is correct and up-to-date. Ensure the signing key used by the client for JWTs matches a public key available to the `oidc-provider` for verification. Check for clock skew between systems if `iat`/`exp` claims are involved.
No dependency data recorded yet.