Elestia Open Source Ratings
4.0

Auth.js

Keep, but not for new work. 8th of 10 authentication libraries.

Auth.js (next-auth) is the long-standing open-source sign-in library for Next.js. Since September 2025 the Better Auth team has run it in security-patch mode, and that team tells new projects to start with Better Auth. v4 is the stable line. v5 has been in beta for about three years. Keep it where it already runs. For new work, pick Better Auth.

Best for: Teams with an existing NextAuth/Auth.js app that want to keep it patched, or apps that need stateless JWT sessions with no database.

WebsiteGitHubnpm

Scores

Overall4.0

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 3.5, likely 2.5 to 4.5

It still works and still gets security patches. But it is in maintenance mode, v5 is stuck in beta, and its own maintainers send new projects to Better Auth, which does the same job better for most people. Keep it where it already runs and pick Better Auth for new work. It is worth considering only when stateless sessions with no database are a hard requirement.

GPT-6.2 Sol: 4.4, likely 3.4 to 5.6

Stable v4 is competent for Next.js sign-in and sessions, and the July patches make it reasonable to keep in existing apps. Better Auth now offers database-free sessions, broader framework support, and much more active development, making it the stronger starting point for most teams. Reusing tested v4 code can still justify choosing it, while the scope of future compatibility work is uncertain.

Needed by many5.1

How many developers need a tool for this job?

Claude Opus 5.5: 5.5, likely 4.5 to 6.5

Most developers who build web apps need sign-in and sessions. But next-auth is tied to Next.js, and the @auth/* packages for other frameworks are a small share of its use. That makes it narrower than the category as a whole.

GPT-6.2 Sol: 4.6, likely 3.5 to 5.8

Sign-in and sessions are common needs for web apps, and Next.js leads meta-framework usage in the State of JavaScript survey. The stable package targets Next.js, and the survey gives only an indirect measure of how many teams need this approach to authentication.

Helps a lot5.9

How well does it do the job for those who need it?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

v4 is mature and has a large set of OAuth providers and adapters. Its limits are clear: credentials (password) sign-in gets weak support, revoking a session needs a denylist you build yourself, edge use needs a split config, there is no enterprise SSO, and Next.js 16 brings friction. Better Auth now covers more features with better in-code configuration for most users.

GPT-6.2 Sol: 6.8, likely 5.7 to 7.9

Stable v4.24.15 handles common OAuth and session flows well, with TypeScript types and a database-free JWT option. Custom password flows take more work, and developers report difficulty finding examples for the right version. The separate v4 and v5 APIs make current examples easy for people and coding agents to mix up.

Holds up over time3.5

Will it still be a good choice in two years?

Claude Opus 5.5: 3.0, likely 2.0 to 4.5

The Better Auth team keeps it alive with security fixes. Only 26 commits landed in the last year, and v5 has no path to a stable release. The stated plan is to fold its stateless sessions into Better Auth, so the ecosystem is moving away from it. It is not abandoned, which keeps the score above the floor.

GPT-6.2 Sol: 4.0, likely 2.9 to 5.3

The Better Auth team has Vercel backing and has followed through on its promise to ship security fixes. Auth.js logged 26 commits and two next-auth npm versions in a year, with more than 200 pull requests open. The handoff gives existing apps a support path, while the limited roadmap leaves future Next.js compatibility harder to predict.

Used widely6.5

How many use it, and is that growing?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

37.4M downloads in 4 weeks and 19,200 dependent repositories show a very large installed base. Its download ratio of about 4.2 is roughly at the median of 4.1, so it is holding share, not gaining. Better Auth grew about 42 times over the same year and now has about twice its downloads, so new projects are going elsewhere.

  • npm downloadsLast4Weeks: 37.4M, against 8.9M a year before, a ratio of about 4.2.
  • medianDownloadsRatio: The median is 4.1, so it is flat in relative terms.
  • dependents repos: 19,200 repositories.
  • peers Better Auth downloadsLast4Weeks: 76.1M, up from 1.8M.

GPT-6.2 Sol: 5.9, likely 4.8 to 7.0

The collector found 19,200 dependent repositories and 304 packages, pointing to an installed base in the tens of thousands. Downloads grew 4.20×, just above the 4.1× catalog baseline and far behind Better Auth's roughly 42×. Repository stars cover multiple Auth.js packages, and repeat installs make it hard to estimate how many new projects chose next-auth.

  • dependents repos, packages: 19,200 indexed repositories and 304 dependent packages.
  • npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: 37.4 million versus 8.9 million downloads, slightly ahead of the catalog baseline.
  • peers Better Auth, Passport: Better Auth grew about 42×, while Passport has far more indexed dependents.
  • project note, github stars, bluesky posts, hackerNews top: 28,389 shared-repository stars, two Bluesky links, and leading HN attention on the handoff.
Vouched for5.5

Who stands behind it being good?

Claude Opus 5.5: 5.0, likely 4.0 to 6.5

It has years of production use and appears in Next.js templates and tutorials. Current independent write-ups now treat it as legacy or a migration path, and its own stewards recommend a different library. Recent HN attention is about the handoff, not about praise.

GPT-6.2 Sol: 5.9, likely 4.7 to 7.0

Cal.diy pins the current stable version, and the official Next.js dashboard course teaches NextAuth using the v5 beta. A recent independent comparison covers the beta too, while one developer reports keeping v4 for existing apps after migration friction. Current independent benchmarks and satisfaction data specific to stable v4 are sparse.

Safe5.5

How safe is it to depend on?

Claude Opus 5.5: 5.0, likely 4.0 to 6.5

It has 14 advisories in total, five in the last 24 months, including a fail-open auth check and an email homoglyph bypass. Fixes shipped quickly on both lines. The Scorecard is 4.9, with weak marks for pinned dependencies, token permissions and code review. On the positive side it has 9 dependencies and an ISC licence. A security-critical library with recent fail-open bugs and a thin maintenance team carries real risk.

  • advisories recent: Four advisories published in July 2026, two marked critical.
  • better-auth.com/blog/security-update-july-2026: All fixed in 4.24.15 and 5.0.0-beta.32.
  • scorecard score: 4.9 overall, with Pinned-Dependencies and Token-Permissions at 0.
  • npm dependencies: 9 dependencies, ISC licence.

GPT-6.2 Sol: 6.0, likely 4.9 to 7.2

Version 4.24.15 patched the three July advisories that affected stable v4 by public disclosure, and an earlier v4 patch fixed email misdelivery. The permissive ISC license helps, and the package has nine direct dependencies. Token-based publishing and weak Scorecard results for token permissions and code review leave supply-chain concerns. The release commit has a verified signature, while the number of people with npm publish access is unclear.

Good

  • A very large set of built-in OAuth providers and database adapters, tested over years of production use.
  • JWT sessions work with no database at all, which Better Auth only partly matches today.
  • Security advisories are still triaged and fixed quickly on both the v4 and v5 lines.
  • ISC licence, a small dependency tree and bundled TypeScript types.

Bad

  • It is in security-patch mode, and its own maintainers point new projects to Better Auth.
  • v5 has been in beta for about three years with no date for a stable release, so `next-auth@latest` still installs v4.
  • There is friction with Next.js 16 (the middleware-to-proxy rename), with edge setups that need a split config, and with peer dependencies.
  • Five advisories in 24 months, several rated high or critical. The OpenSSF Scorecard is 4.9.

The numbers

npm downloads, 4 weeks
37M ×4.2 in a year
GitHub stars
28k
Commits, 12 months
26
npm version
4.24.15 Jul 2026
Versions, 12 months
2
Advisories, 24 months
5 of 14 ever
OpenSSF Scorecard
4.9 out of 10, Oct 2026
Licence
ISC

Auth.js was named NextAuth.js. The downloads are of the next-auth package only.

Read on 21 November 2026 from GitHub (nextauthjs/next-auth), npm (next-auth), OSV and the OpenSSF Scorecard.

Authentication libraries

  1. 8.5Better Auth
  2. 8.3jose
  3. 7.9openid-client
  4. 6.8iron-session
  5. 6.3SuperTokens
  6. 5.2jsonwebtoken
  7. 4.9Passport
  8. 4.0Auth.js
  9. 1.6Arctic
  10. 1.6Lucia
Compare all 10 on six scores