# Authentication libraries

Sign users in, keep their sessions, and check tokens. Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.

| Rank | Project | Overall | Needed by many | Helps a lot | Holds up over time | Used widely | Vouched for | Safe | Best for |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | [Better Auth](https://elestia.ai/opensource/auth/better-auth/index.md) | 8.5 | 7.2 | 8.3 | 8.3 | 7.9 | 7.8 | 5.6 | TypeScript teams that want full-featured auth in their own database and their own code, on any framework or runtime. |
| 2 | [jose](https://elestia.ai/opensource/auth/jose/index.md) | 8.3 | 5.6 | 8.9 | 8.1 | 7.5 | 8.3 | 8.7 | Developers who need to sign, verify or encrypt JWTs, or to check tokens against an identity provider's JWKS, on any runtime, including edge. |
| 3 | [openid-client](https://elestia.ai/opensource/auth/openid-client/index.md) | 7.9 | 5.1 | 8.4 | 7.7 | 6.4 | 8.0 | 8.6 | 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. |
| 4 | [iron-session](https://elestia.ai/opensource/auth/iron-session/index.md) | 6.8 | 4.8 | 7.3 | 6.8 | 4.7 | 6.5 | 7.8 | Teams that already handle sign-in themselves and want simple, database-free encrypted cookie sessions, especially in Next.js. |
| 5 | [SuperTokens](https://elestia.ai/opensource/auth/supertokens/index.md) | 6.3 | 5.7 | 7.1 | 6.6 | 3.7 | 4.9 | 6.6 | Teams that want strict session security, a prebuilt React login UI, and the option of a managed or self-hosted auth core. |
| 6 | [jsonwebtoken](https://elestia.ai/opensource/auth/jsonwebtoken/index.md) | 5.2 | 5.4 | 5.5 | 4.4 | 8.0 | 6.5 | 6.3 | Existing Node.js-only backends that already use it for simple HS256/RS256 tokens and have no edge, JWE or JWKS needs. |
| 7 | [Passport](https://elestia.ai/opensource/auth/passport/index.md) | 4.9 | 5.8 | 5.7 | 3.1 | 6.8 | 6.5 | 5.8 | Teams keeping an existing Express or NestJS app that already uses Passport strategies, or that need a rare login provider only a Passport strategy covers. |
| 8 | [Auth.js](https://elestia.ai/opensource/auth/authjs/index.md) | 4.0 | 5.1 | 5.9 | 3.5 | 6.5 | 5.5 | 5.5 | Teams with an existing NextAuth/Auth.js app that want to keep it patched, or apps that need stateless JWT sessions with no database. |
| 9 | [Arctic](https://elestia.ai/opensource/auth/arctic/index.md) | 1.6 | 4.3 | 5.2 | 0.7 | 3.2 | 2.9 | 4.1 | Nobody starting today; only existing codebases that already use it should keep it while they plan a move to openid-client or a full auth framework. |
| 10 | [Lucia](https://elestia.ai/opensource/auth/lucia/index.md) | 1.6 | 5.8 | 4.4 | 0.8 | 3.2 | 2.4 | 4.1 | Existing Lucia v3 codebases planning a migration, and developers reading the Lucia guides to write their own session code. |

## The numbers

| Project | Downloads, 4 weeks | In a year | GitHub stars | Commits, 12 months | Last npm release | Advisories, 24 months |
| --- | --- | --- | --- | --- | --- | --- |
| Better Auth | 76M | ×42 | 31k | 3k | Nov 2026 | 26 |
| jose | 915M | ×10 | 7.9k | 291 | Nov 2026 | 0 |
| openid-client | 95M | ×5.4 | 2.5k | 147 | Nov 2026 | 0 |
| iron-session | 15M | ×6.3 | 4.2k | 31 | Nov 2026 | 0 |
| SuperTokens | 316k | ×2.4 | 330 | 127 | Oct 2026 | 0 |
| jsonwebtoken | 328M | ×3.3 | 18k | 5 | Dec 2025 | 0 |
| Passport | 42M | ×2.4 | 24k | 0 | Nov 2023 | 0 |
| Auth.js | 37M | ×4.2 | 28k | 26 | Jul 2026 | 5 |
| Arctic | 6M | ×9.3 | 1.7k | 6 | May 2025 | 0 |
| Lucia | 2.9M | ×9.8 | 10k | 9 | Oct 2024 | 0 |

All categories: https://elestia.ai/opensource/index.md
