Better Auth
A strong pick. 1st of 10 authentication libraries.
Better Auth is a self-hosted, framework-agnostic TypeScript auth framework. It stores users and sessions in your own database and adds 2FA, passkeys, organizations, SSO and more through plugins. Today it is the strongest default for new full-stack TypeScript apps, but its fast release pace has brought a run of serious plugin advisories and one painful 1.x schema break.
Best for: TypeScript teams that want full-featured auth in their own database and their own code, on any framework or runtime.
Scores
Overall8.5
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 8.5, likely 7.5 to 9.0
Among full auth frameworks, it is the clear pick for a new TypeScript app today. Auth.js is in maintenance mode, Passport has not had a commit in a year, and Lucia is deprecated. jose, jsonwebtoken and openid-client are lower-level building blocks. It is held back from a 9+ by its advisory record and by the 1.7 migration break, so teams should pin versions, follow advisories and enable only the plugins they need.
- peers commitsLastYear: Auth.js 26, Passport 0, Lucia 9 vs Better Auth 2967
- blog.logrocket.com/best-auth-library-nextjs-2026: Recommended default; Auth.js in security-patch mode
- advisories: Recent critical and high advisories
- better-auth.com/blog/1-7-account-schema: Breaking-change incident within 1.x
GPT-6.2 Sol: 8.5, likely 7.3 to 9.4
Better Auth is the strongest full-stack pick in this group for a new app that owns its sign-in and sessions. It covers more of the account lifecycle than Auth.js, ships actively with a funded core team, and has credible production adopters. For a service that only verifies JWTs, jose is a better fit. Recent security fixes and upgrade work keep Better Auth below 9 and leave room for different experiences across plugin configurations.
- github.com/nextauthjs/next-auth: Auth.js recommends Better Auth for most new projects.
- blog.val.town/better-auth: A production adopter reports the benefits of controlling its own authentication and sessions.
- vercel.com/blog/vercel-acquires-better-auth: Vercel backs continued development by the core team.
- github.com/panva/jose: jose offers standalone JWT and JWKS verification across JavaScript runtimes.
- better-auth.com/docs/guides/1-7-upgrade-guide: Several configurations require manual migration or coordinated package upgrades.
- better-auth.com/blog/security-release-2026-11-03: The latest stable line includes fixes from a substantial coordinated security release.
Needed by many7.2
How many developers need a tool for this job?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
Most web apps that have users need sign-in and sessions, and Better Auth works across frameworks and runtimes. It is aimed at full-stack TypeScript apps that own their database, not at projects that only need JWT checks or that use a hosted identity provider. That makes it narrower than all of auth, but still a large group.
- dev.to/pickuma/better-auth-review-the-self-hosted-framework-agnostic-auth-library-for-2026-611: Self-hosted and framework-agnostic
- category scope: Primitives like jose and jsonwebtoken serve a different, lower-level need
GPT-6.2 Sol: 7.3, likely 6.2 to 8.3
Sign-in and sessions are common needs for teams building web apps with user accounts. Better Auth works with Next.js, SvelteKit, Nuxt, Express, Cloudflare Workers, and Expo, so its audience extends across frameworks and runtimes. The range reflects how many teams use managed identity, need only token verification, or build apps without accounts.
- better-auth.com/docs/installation: Documents framework and runtime integrations, client libraries, and storage options.
- docs.astro.build/en/guides/authentication: Astro documents Better Auth as an option for adding accounts to its apps.
Helps a lot8.3
How well does it do the job for those who need it?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
No library in this group covers more: it has the widest feature set through plugins, strong TypeScript inference and in-code configuration. Users praise the developer experience and compare it to Django auth for TypeScript. Its limits: there is no UI, there are framework gotchas such as Next.js cookies in Server Actions, and several plugin flows had serious logic bugs this year. Some HN users also found the early code rushed.
- blog.logrocket.com/best-auth-library-nextjs-2026: Called the strongest default and the only library gaining features; lists the nextCookies and edge caveats
- news.ycombinator.com/item?id=48038827: Users praise DB ownership and DX; one says early code felt rushed but is improving
- npm hasTypes: Ships its own types
GPT-6.2 Sol: 8.6, likely 7.5 to 9.6
Version 1.7.27 combines typed client and server APIs, password and social login, database-backed or stateless sessions, and plugins for passkeys, organizations, and JWTs. The examples and dedicated agent docs make common setups easier to implement. Teams still build their own sign-in UI, and independent evidence on throughput and the correctness of agent-generated integrations is limited.
- better-auth.com/docs/introduction: Describes the core account, sign-in, session, and plugin features.
- better-auth.com/docs/concepts/session-management: Documents database-backed and stateless sessions, caching, and revocation.
- better-auth.com/docs/plugins/jwt: Documents JWT issuance and public keys for verification by external services.
- better-auth.com/docs/ai-resources/skills: Provides project-specific instructions and documentation access for coding agents.
- startwithidentity.com/reports/identity-developer-experience-2026: Independent feature comparison scored Better Auth 69 and Auth.js 38 out of 100 using documented capabilities.
Holds up over time8.3
Will it still be a good choice in two years?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
Activity is very high: 2,967 commits, 181 releases and over 1,000 contributors, and Vercel acquired the team in July 2026 with a pledge to keep it open source and framework-agnostic. The ecosystem is moving toward it, as Auth.js now sits under the same team. Two things hold the score back: the 1.7 schema break, which the maintainers have publicly promised to prevent, and the risk that the roadmap shifts toward Vercel's agent-identity work.
- github commitsLastYear / releasesLastYear: 2967 commits and 181 releases
- vercel.com/blog/vercel-acquires-better-auth: Vercel acquisition; stays open source and agnostic
- better-auth.com/blog/1-7-account-schema: Admits the 1.7 core migration broke the 1.x promise; adds release guardrails
- workos.com/blog/should-i-migrate-from-better-auth-vercel-acquisition: A competitor argues the roadmap will lean toward Vercel (biased source)
GPT-6.2 Sol: 8.5, likely 7.2 to 9.5
Vercel brought on the core team, and Better Auth is shipping more actively than any peer in the bundle. The repository recorded 2,967 commits and npm published 94 versions in the past year, including backports for the 1.6 line. Hundreds of open issues and pull requests, a recent schema reversal in a patch, and limited visibility into release permissions keep the two-year forecast uncertain.
- github.commitsLastYear, github.openIssues, github.openPullRequests, npm.versionsLastYear, peers: The repository is highly active, with 433 open issues and 535 open pull requests.
- vercel.com/blog/vercel-acquires-better-auth: Vercel confirmed the acquisition and the core team's continued work on Better Auth.
- github.com/better-auth/better-auth/releases: Recent releases include the current 1.7 line and a maintained 1.6 line.
- github.com/openstarterkit/nextjs-saas-starter-kit/blob/main/CHANGELOG.md: A downstream maintainer documents a database migration after the 1.7.3 patch reverted a schema change.
Used widely7.9
How many use it, and is that growing?
Claude Opus 5.5: 8.5, likely 7.5 to 9.0
Downloads grew about 42x in a year (76M versus 1.8M per 4 weeks), against a median of 4.1x. It now has twice the next-auth downloads and the most stars in the category. Some of this volume comes from CI and from bundling in starters. There is no dependents count, so the true number of projects is uncertain, but the trend is clearly the strongest in the category.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 76.1M vs 1.83M, ~42x growth
- peers Auth.js downloadsLast4Weeks: next-auth at 37.4M, growing ~4.2x
- github stars: 30.8k, the most among peers
- dependents: null, so the project count is not confirmed
GPT-6.2 Sol: 7.2, likely 5.3 to 8.6
Four-week npm downloads rose from 1.83 million to 76.1 million, about 42 times year over year against the catalog median of 4.1 times. That is the fastest growth in the bundle, ahead of Auth.js and Passport, and Better Auth also leads these peers in stars and repository-linked Bluesky posts. Build servers and downstream installs inflate the volume, while the missing ecosyste.ms count and npm's narrower count of 956 dependent packages leave the number of projects choosing it uncertain.
- npm.downloadsLast4Weeks, npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio, peers: Better Auth grew about 42 times, compared with 4.2 times for Auth.js and 2.4 times for Passport.
- github.stars, bluesky.posts, hackerNews.top, dependents: 30,800 stars and 18 Bluesky links show attention, and ecosyste.ms supplies no dependent count.
- npmjs.com/package/better-auth?activeTab=versions: npm lists 956 dependent packages and confirms the stable version.
Vouched for7.8
Who stands behind it being good?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
Vercel bought it and offers it in Vercel Connect, the Auth.js maintainers handed their project to it, and YC and Peak XV funded it. Independent guides such as LogRocket name it the default for new self-hosted Next.js apps, and HN users describe moving to it from Clerk and Supabase. Survey satisfaction data is missing, and most write-ups are blogs rather than production case studies.
- blog.logrocket.com/best-auth-library-nextjs-2026: Independent recommendation as the default
- hackerNews top: Auth.js joins Better Auth; a Supabase-to-Clerk-to-Better Auth migration story with 304 points
- thenewstack.io/vercel-acquires-better-auth: Coverage of the Vercel acquisition
GPT-6.2 Sol: 8.0, likely 6.7 to 9.0
Val Town reports moving production sign-in and sessions to Better Auth, Dokploy uses it for sign-in, and Convex maintains an integration. An independent comparison found broader documented capabilities than Auth.js, and users describe straightforward setup alongside gaps in logging. The surveys reviewed provide no Better Auth satisfaction score, and the comparison measured documented features, so confidence about long-term production experience is lower.
- blog.val.town/better-auth: Val Town describes its production migration and explains why it chose Better Auth.
- docs.dokploy.com/docs/core/guides/cloudflare-tunnels: Dokploy documents Better Auth configuration for its own login.
- labs.convex.dev/better-auth: Convex provides a dedicated component and guides for several frameworks.
- news.ycombinator.com/item?id=48038827: A user praises extensibility and setup while describing limited logging.
- startwithidentity.com/reports/identity-developer-experience-2026: The comparison scores documented capabilities and does not measure live implementations.
- survey.stackoverflow.co/2026/technology: The survey supplies no Better Auth satisfaction or retention measure.
Safe5.6
How safe is it to depend on?
Claude Opus 5.5: 5.0, likely 4.0 to 6.5
There were 26 advisories in 24 months. In October 2026 they included a critical account takeover via magic-link/OAuth state and a high-severity OAuth Proxy sign-in-as-another-user bug, and pre-account hijacking followed in July. Fixes shipped quickly (1.7.7) with clear mitigations and public disclosure. Still, the rate of account-takeover bugs in an auth library is a real concern. There is no Scorecard, it has 17 dependencies, and the licence is MIT.
- advisories: 26 in 24 months, including CRITICAL and HIGH in Oct 2026
- corgea.com/research/cve-2026-96760-114607-116672-114616-authlib-better-auth-october-2026: Oct 2026 batch fixed in 1.7.7; all nodes must upgrade together
- vulncheck.com/advisories/better-auth-1.5.0-beta.12-before-1.7.7-authentication-bypass-via-oauth-proxy: OAuth Proxy auth bypass affected many versions
- scorecard: No OpenSSF Scorecard data
- npm dependencies: 17 dependencies
GPT-6.2 Sol: 6.2, likely 4.8 to 7.7
The critical Magic Link issue had a fix in 1.7.7, and the November disclosure shipped fixes for 12 advisories in 1.7.16, including a critical Expo issue. Some affected deployments also needed secret rotation or data cleanup. The MIT license and automated GitHub Actions publishing with OIDC are positives. Seventeen direct dependencies, repeated serious flaws, and limited visibility into publisher access and OpenSSF checks keep the range wide.
- npm.license, npm.dependencies, advisories, scorecard: The bundle records MIT, 17 direct dependencies, 26 advisories in its snapshot, and no Scorecard result.
- github.com/better-auth/better-auth/security/advisories/GHSA-965c-763c-88jm: GitHub lists 1.7.7 as the patched version for the critical Magic Link issue.
- vercel.com/kb/bulletin/better-auth-november-2026-security-release: The November bulletin identifies fixed versions and follow-up remediation for affected plugins.
- raw.githubusercontent.com/better-auth/better-auth/v1.7.27/.github/workflows/release.yml: The tagged release workflow publishes through GitHub Actions with OIDC permissions.
Good
- Covers email/password, social OAuth, magic links, passkeys, 2FA, organizations and SSO in one library, with typed plugins.
- Runs inside your app against your own database through Drizzle, Prisma or Kysely adapters, with no per-user cost.
- Very active: 181 releases and almost 3,000 commits in the last year, and its core team is now employed by Vercel.
- Auth.js maintenance moved to the same team, and guides now point new Next.js projects to Better Auth.
Bad
- 26 advisories in two years, including a critical magic-link/OAuth-state account takeover in October 2026.
- Release 1.7 forced an unplanned core-table migration within 1.x that broke sign-ins for some users.
- You build all sign-in and sign-up UI yourself, which takes days compared with minutes on hosted services like Clerk.
- The rapid release pace means frequent upgrades, and all @better-auth/* packages must move in lockstep.
The numbers
- npm downloads, 4 weeks
- 76M ×42 in a year
- GitHub stars
- 31k
- Commits, 12 months
- 3k
- npm version
- 1.7.27 Nov 2026
- Versions, 12 months
- 94
- Advisories, 24 months
- 26 of 26 ever
- OpenSSF Scorecard
- None
- Licence
- MIT
Read on 21 November 2026 from GitHub (better-auth/better-auth), npm (better-auth), 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