openid-client
A strong pick. 3rd of 10 authentication libraries.
openid-client is a certified OAuth 2 and OpenID Connect client for server and edge runtimes. It is the most complete and spec-correct way to sign users in through an external identity provider from JavaScript. It does not handle sessions or provide UI, so you build those parts yourself or put a framework on top.
Best for: Teams that sign users in through an external OIDC provider (Okta, Entra, Keycloak and others) and want a certified, low-level client on any runtime.
Scores
Overall7.9
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
It is clearly the best JavaScript choice when you need a certified OIDC or OAuth client against an external provider. It is actively maintained, has few dependencies, and is trusted by major auth SDKs. It is not a full authentication solution: apps that want sessions, email and password, or UI out of the box should look at Better Auth or Auth.js. A single maintainer and the painful v6 migration keep it out of the top band.
- github.com/panva/openid-client: Certified, universal, actively released
- github.com/panva/openid-client/discussions/702: Migration pain from v5 to v6
- peers Better Auth: A full-stack framework with far more momentum for general sign-in
- npm-compare.com/oidc-client,openid-client: Compared as the server-side OIDC client choice
GPT-6.2 Sol: 8.2, likely 7.1 to 9.1
openid-client is a strong pick for new projects that already have an identity provider and need a standards-based client. Certified protocol coverage, active maintenance, and tested downstream integrations support that recommendation. Better Auth is a better fit for projects that need built-in application sessions, and the amount of work left to the app keeps openid-client from being the default for the whole category.
- openid.net/certification/certified-fapi-2-0-rp-security-profile-final-message-signing-final: Confirms advanced protocol conformance for v6.
- github.com/panva/openid-client/releases/tag/v6.9.1: Current stable release fixes Passport handling and TypeScript exports.
- github.com/medusajs/medusa/pull/17595: A current downstream integration exercised discovery and code exchange.
- better-auth.com/docs/concepts/session-management: Better Auth includes cookie-based session management.
Needed by many5.1
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Signing users in through an external OIDC or OAuth provider is common in business and enterprise apps, but many projects use a full auth framework or a hosted SDK instead. It covers only the client side of the category's job and leaves sessions to the app. It is not tied to one framework or runtime, which keeps it from being narrower.
- github.com/panva/openid-client: OAuth/OIDC client API for browsers, Bun, Workers, Deno, Electron and Node.js
- passportjs.org/packages/openid-client: No framework middleware except a Passport strategy
GPT-6.2 Sol: 5.2, likely 4.0 to 6.3
Delegating sign-in to an existing identity provider is a common web app need, and the library works across frameworks and runtimes. Its direct audience is narrower because it leaves user accounts and application sessions to the caller. The State of React survey gives context for authentication demand, while the share of developers who need a standalone OIDC client remains uncertain.
- github.com/panva/openid-client/blob/v6.9.1/README.md: Lists supported runtimes and shows app-owned session state.
- 2025.stateofreact.com/en-US/other-tools/#authentication: Survey reports use of authentication tools across React projects.
Helps a lot8.4
How well does it do the job for those who need it?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
For a relying party it is the most complete and correct JavaScript client available. It is certified for Basic, FAPI 1.0 and FAPI 2.0, covers almost every modern OAuth extension, and ships its own types. The v6 functional API is lean, but it has fewer docs and examples than full frameworks, and it has no session handling. v6 also dropped some v5 features, such as encrypted assertions and several response types and modes.
- github.com/panva/openid-client: Feature list and certified conformance profiles
- github.com/panva/openid-client/discussions/702: v6 removed features; users note there is no migration guide
- npm hasTypes: Ships TypeScript types
- mojoauth.com/security-guides/implement-oauth2-oidc-with-nextjs: Third-party Next.js guide using v6.8.8 with PKCE and discovery
GPT-6.2 Sol: 8.7, likely 7.6 to 9.6
Version 6.9.1 covers OIDC discovery, code exchange, ID token checks, refresh, and introspection, with certified FAPI 2.0 support. Its typed API and current examples give developers and coding agents a starting point, but the app still has to persist login state and handle the callback. Medusa verified the v6 flow in integration tests and found that useful error details can sit in error.cause. Comparative performance and coding-agent accuracy remain unmeasured here.
- github.com/panva/openid-client/blob/v6.9.1/README.md: Documents supported flows and shows how to retain PKCE and state.
- github.com/panva/openid-client/blob/v6.9.1/docs/README.md: Versioned API reference groups typed functions by task.
- openid.net/certification/certified-fapi-2-0-rp-security-profile-final-message-signing-final: Lists seven final FAPI 2.0 client conformance profiles.
- github.com/medusajs/medusa/pull/17595: Records passing integration tests, a smoke test, and error handling changes.
Holds up over time7.7
Will it still be a good choice in two years?
Claude Opus 5.5: 7.5, likely 6.0 to 8.5
Maintenance is very active: 147 commits and 10 releases in the last year, a release the day before this review, and zero open issues or pull requests. Auth0 by Okta sponsors it. The main risk is that one maintainer carries it, and the v5-to-v6 rewrite shows that big breaking changes can happen.
- github commitsLastYear / releasesLastYear: 147 commits and 10 releases in the last year
- github openIssues / openPullRequests: 0 open issues and 0 open PRs; 364 issues closed
- github.com/panva/openid-client: Auth0 by Okta sponsorship; only v6 receives fixes
- jira.mongodb.org/browse/MONGOSH-2194: Downstream projects treat the v6 adoption as a rewrite
GPT-6.2 Sol: 7.8, likely 6.5 to 8.8
The project shipped 10 releases and recorded 147 commits over the past year, and a recent TypeScript regression was fixed the day it was reported. GitHub Sponsors provides some funding, while recent releases point to one lead maintainer and the backup release capacity is unclear. Users reported migration friction after the v6 rewrite, and v5 reached end of life in April 2026.
- github commitsLastYear, releasesLastYear, latestRelease: 147 commits, 10 releases, and v6.9.1 on November 20.
- github.com/panva/openid-client/issues/903: A strict TypeScript declaration bug was reported and fixed on November 2.
- github.com/sponsors/panva: Shows active sponsorship for the maintainer's work across projects.
- github.com/panva/openid-client/actions/runs/44735033864: The lead maintainer triggered the current release.
- github.com/panva/openid-client/discussions/808: A TypeScript user describes days of v5-to-v6 migration work.
- github.com/panva/openid-client/discussions/770: Sets the v5 end-of-life date at April 30, 2026.
Used widely6.4
How many use it, and is that growing?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
Downloads rose from 17.6M to 95.4M per 4 weeks, a ratio of about 5.4, which is above the 4.1 median. Much of that volume is transitive: next-auth v4, express-openid-connect and MongoDB's OIDC tooling install it. Still, 22,658 dependent repos is more than Auth.js has, which points to tens of thousands of direct users.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 95.4M vs 17.6M, ratio about 5.4 against a 4.1 median
- dependents repos: 22,658 repos and 515 packages; Auth.js has 19,200 repos
- next-auth v4 and express-openid-connect package.json: Both depend on openid-client, which inflates its downloads
- github stars: 2,452 stars, modest next to the frameworks
GPT-6.2 Sol: 5.8, likely 4.5 to 7.0
Four-week downloads rose from 17.6 million to 95.4 million, or 5.44× year over year against the 4.1× catalog baseline. That is positive relative growth, though Better Auth and jose grew faster in the same window. Ecosyste.ms found 22,658 dependent repos, slightly ahead of NextAuth and well below Passport and jose. NextAuth v4 installs openid-client v5, and the download totals group all versions, so growth in direct v6 adoption is harder to pin down.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: Download growth is 5.44× against a 4.1× baseline.
- dependents, peers: 22,658 repos and 515 packages counted, with faster growth for Better Auth and jose.
- github.com/nextauthjs/next-auth/blob/next-auth@4.24.15/packages/next-auth/package.json: The stable NextAuth v4 package depends on openid-client v5.
Vouched for8.0
Who stands behind it being good?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
It has formal OpenID Foundation certification for several relying-party profiles, Okta/Auth0 sponsors it, and widely used SDKs and products such as Auth.js v4, express-openid-connect and MongoDB tooling build on it. Independent community discussion is thin, with no HN or Bluesky attention, so the support comes mostly from institutions rather than user write-ups.
- github.com/panva/openid-client: Certified conformance profiles; Auth0 sponsor
- jira.mongodb.org/browse/MONGOSH-2194: MongoDB shell relies on it for OIDC
- hackerNews / bluesky: 0 stories and 0 posts
GPT-6.2 Sol: 8.4, likely 7.3 to 9.3
The OpenID Foundation lists v6 conformance for basic OIDC and final FAPI 2.0 client profiles. Auth0's Express middleware ships with v6, Medusa tested and merged its own v6 upgrade, and AWS uses openid-client in its Cognito Node.js sample. An independent OIDC implementation also used it as a reference in a cross-library comparison. These sources cover interoperability and real integrations, with limited evidence on broad developer satisfaction.
- openid.net/certification/certified-openid-relying-parties-profiles: Lists Basic Relying Party certification for v6.1.3 and later.
- openid.net/certification/certified-fapi-2-0-rp-security-profile-final-message-signing-final: Lists final FAPI 2.0 certifications for v6.6.2 and later.
- github.com/auth0/express-openid-connect/releases: Auth0 shipped openid-client v6 in its v3 Express middleware.
- github.com/medusajs/medusa/pull/17595: Medusa merged a tested v6 upgrade for its OIDC provider.
- docs.aws.amazon.com/cognito/latest/developerguide/getting-started-user-pools-application.html: The Cognito Node.js sample uses openid-client in its callback.
- github.com/Bdaya-Dev/oidc/issues/324: An independent implementation compared its OIDC behavior with openid-client.
Safe8.6
How safe is it to depend on?
Claude Opus 5.5: 8.5, likely 7.5 to 9.0
It has no known advisories, only two dependencies from the same trusted author, and an MIT licence. Security fixes are clearly limited to v6. There is no Scorecard data, and releases rest with a single maintainer, which keeps the score below the top.
- advisories total: 0 advisories
- npm dependencies: 2 dependencies
- scorecard: No Scorecard data available
- npm license: MIT
GPT-6.2 Sol: 8.6, likely 7.4 to 9.5
The package is MIT-licensed, has two runtime dependencies, and has no published advisories in the supplied OSV snapshot or on GitHub. The v6.9.1 release has a verified signed commit, and its GitHub Actions workflow is configured for npm trusted publishing and package attestations. The missing OpenSSF Scorecard and unclear number of authorized publishers leave some uncertainty about repository controls and release access.
- npm license, dependencies, advisories, scorecard: MIT, two runtime dependencies, zero OSV advisories, and no Scorecard result.
- github.com/panva/openid-client/security/advisories: GitHub lists no published project advisories.
- github.com/panva/openid-client/releases/tag/v6.9.1: Immutable GitHub release with a verified signed commit.
- github.com/panva/openid-client/blob/v6.9.1/.github/workflows/release.yml: Configures trusted publishing, package attestations, and tarball checks.
Good
- The maintainer has certified it against the OpenID Basic, FAPI 1.0 and FAPI 2.0 relying-party profiles.
- It covers PKCE, PAR, DPoP, JAR, JARM, CIBA, device flow, introspection and revocation.
- v6 is universal ESM on Web Crypto and Fetch, so it runs on Node.js, Deno, Bun, Cloudflare Workers and browsers.
- It has only two dependencies (jose and oauth4webapi, by the same author), an MIT licence and no known advisories.
Bad
- It is low-level: there are no sessions, cookies, UI or framework middleware beyond a Passport strategy.
- The v6 rewrite broke the v5 API, dropped some features and shipped without a migration guide, which users complain about.
- v6 is ESM-only and needs Node.js 20 or newer; CommonJS works only where require(esm) is available.
- One person maintains and releases it, which is a bus-factor risk.
The numbers
- npm downloads, 4 weeks
- 95M ×5.4 in a year
- GitHub stars
- 2.5k
- Commits, 12 months
- 147
- npm version
- 6.9.1 Nov 2026
- Versions, 12 months
- 10
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
Read on 21 November 2026 from GitHub (panva/openid-client), npm (openid-client), OSV and the OpenSSF Scorecard.
Authentication libraries
- 8.5Better Auth
- 8.3jose
- 7.9openid-client
- 6.8iron-session
- 6.3SuperTokens
- 5.2jsonwebtoken
- 4.9Passport
- 4.0Auth.js
- 1.6Arctic
- 1.6Lucia