oidc-client is a comprehensive JavaScript client library for OpenID Connect (OIDC) and OAuth2, designed to facilitate secure authentication and authorization in web applications. It handles complex OAuth2 flows, including Authorization Code Flow with PKCE, implicit flow, and refresh token management, abstracting away much of the underlying protocol complexity. Developed by IdentityModel, it maintains a strong focus on security and adherence to OIDC/OAuth2 specifications. The current stable version is 1.11.5, with an active development cycle characterized by frequent bug fix releases and minor feature updates approximately every 1-2 months, as evidenced by recent patch versions. Key differentiators include its robust handling of session management, silent token renewal, and extensive configurability, making it suitable for a wide range of single-page applications and client-side integrations.
npm install oidc-clientVerified import paths — ran on the pinned version, not inferred.
Demonstrates the basic setup of UserManager for OIDC authentication, including configuration for sign-in, sign-out, and handling redirect callbacks for a Single Page Application (SPA).
Ensure you are on version 1.11.5 or newer. Carefully review your `OidcClientSettings` and the discovered OIDC metadata if encountering issues with endpoint or configuration resolution.
Upgrade to version 1.11.3 or later if you intend to use PKCE within a popup workflow. Alternatively, use redirect-based flows.
Remove any references to `getEpochTime` from your `OidcClientSettings`. The library now internally manages time-related calculations, or uses standard JavaScript Date objects.
Always provide a `UserManagerSettings` object to the `UserManager` constructor. Even if empty, pass `{}`. E.g., `new UserManager({})`.While `oidc-client` aims for promise compatibility, if encountering issues, consider using native Promises or an alternative promise library, or upgrade to the latest version where this might be resolved or mitigated.
Upgrade to `oidc-client@1.11.2` or newer to get the corrected typings for the `getToken` method.
Instantiate `UserManager` with an empty object if no settings are needed: `new UserManager({});`Ensure your OIDC provider is returning a correctly formatted sign-out response. Upgrade to `oidc-client@1.9.1` or newer which includes a fix for this specific validation issue.
Upgrade `oidc-client` to version 1.10.0 or newer. This version included specific fixes to address Angular 8 build errors, likely related to TypeScript configurations or module bundling.
No dependency data recorded yet.