Auth.js vs Better Auth

Auth.js: Adding social sign-in to Next.js and similar apps.; Better Auth: TypeScript apps that want self-hosted auth in their own database.

FieldAuth.jsBetter Auth
PricingOpen sourceOpen source
Open sourceYesYes
Self-hostableYesYes
EcosystemJavaScript / TypeScriptJavaScript / TypeScript
LicenseISCMIT
CategoryAuthAuth

Choose Better Auth over Auth.js when

Choose it for new projects: it stores accounts in your database and adds plugins for organizations, passkeys and SSO, while Auth.js gets only security patches and urgent fixes. The same team maintains both since 2025-09-22.

Better Auth: since 2025-09-22 the same team maintains both. Better Auth stores accounts in your database and adds plugins for organizations, passkeys and SSO (organization plugin, passkey, SSO), while Auth.js gets "security patches and urgent issues" (announcement).

SourceChecked 25 November 2026

Choose Auth.js over Better Auth when

Choose it for the longer track record under an ISC licence and 94 documented providers. Its v5 has been in beta since 2023 and its maintainers recommend Better Auth for new projects.

Auth.js: ISC licence, the longer track record, 94 documented providers, but v5 has been in beta since 2023 and its maintainers recommend Better Auth for new projects (README).

SourceChecked 25 November 2026

Auth.js

An open-source authentication library for web frameworks, best known as NextAuth.js, with many OAuth providers built in.

Choose Auth.js if

Adding social sign-in to Next.js and similar apps.

Why it’s here

Auth.js, formerly NextAuth.js, adds OAuth, email and credentials sign-in to a Next.js, SvelteKit, Express or Qwik app, inside your own code and without a hosted service. Its docs list 94 providers, including the email and Credentials ones, and 24 database adapters (docs). Sessions can be encrypted JWT cookies with no database at all (session strategies, README).

Pick it when

  • You already run it. The maintainers say existing users "can continue doing so without disruption" and that security patches continue (announcement).
  • You need stateless sessions against an existing backend such as LDAP or Active Directory. The README names stateless sessions without a database as the main reason not to switch (README); Better Auth's docs now describe a database-free stateless mode, so check that it covers your case (Better Auth sessions).

Skip it when

  • You are starting a new project. The README recommends Better Auth for new projects, and the migration guide says "we strongly recommend using Better Auth" (README, migration guide).
  • You need passwords, two-factor or organizations from the library. Users signed in through the Credentials provider "are not persisted in the database" (Credentials).

Current state

next-auth@latest is 4.24.15, published 2026-07-20. v5 is on the beta tag at 5.0.0-beta.32, published the same day; its first beta was 2023-10-24 (releases, npm registry). The licence is ISC, copyright Balázs Orbán (LICENSE). Better Auth Inc. announced on 2025-09-22 that it now oversees the project, and the docs footer carries its copyright (announcement). Better Auth then said on 2026-07-07 that it is joining Vercel (post).

Setup

npm install next-auth@beta
npx auth secret

Watch out for

Plain npm install next-auth installs v4; v5 needs the @beta tag (security post, installation). Guides for v4 and v5 differ, so match the guide to the version. The July 2026 release fixed four advisories, among them a v5 middleware check that failed open on provider configuration errors and an email check done before Unicode normalization (GHSA-8fpg-xm3f-6cx3, GHSA-7rqj-j65f-68wh). Each @auth/* package pins @auth/core exactly, so update the framework or adapter package, not the core alone.

Auth.js on GitHub

Better Auth

A framework-agnostic authentication library for TypeScript with email/password, OAuth, sessions and a plugin system.

Choose Better Auth if

TypeScript apps that want self-hosted auth in their own database.

Why it’s here

Better Auth is a TypeScript auth framework that runs inside your app and keeps users, sessions and accounts in your own database: SQLite, Postgres, MySQL, or an ORM adapter such as Prisma or Drizzle (installation). With no database configured it switches to stateless mode, where the session lives in a signed or encrypted cookie; most plugins still need a database (session management, installation). Plugins add organizations with teams, passkeys, SAML and OIDC SSO, and SCIM provisioning (organization, passkey, SSO, SCIM).

Pick it when

  • You are starting a TypeScript project and want auth tables in your own database with no per-user fee.
  • You are on Auth.js. The same team maintains both and publishes a migration guide (guide).
  • You need your app to act as an OAuth or OpenID Connect provider. Version 1.7 expanded that, with DPoP, back-channel logout and SCIM Groups (1.7 post).

Skip it when

  • Nobody on your team can apply security updates promptly. See Watch out for.
  • You want someone else to host the user database and patch it. Clerk does both and ships prebuilt components (Clerk docs).
  • You need the 1.x upgrade path to be uneventful this quarter. The 1.7 release changed the database schema in a minor version and broke sign-ins (account change).

Pricing

The framework is free. The optional Better Auth Infrastructure dashboard, read 2026-11-17, is Starter at $0 (1 dashboard seat, 10,000 audit logs a month) and Pro at $20 a month (unlimited seats, 20,000 audit logs, then $0.0001 per event) (pricing).

Current state

The latest stable release is 1.7.25, published 2026-11-14; 1.8.0-beta.10 is on the beta tag (releases). The licence is MIT, copyright Bereket Engida (LICENSE). Better Auth Inc. took over maintaining Auth.js on 2025-09-22 and announced on 2026-07-07 that it is joining Vercel, citing a shared commitment "to keeping auth open source, framework and platform agnostic" (Auth.js post, Vercel post).

Setup

npm install better-auth
npx auth@latest migrate

migrate works only with the built-in Kysely adapter; with Prisma or Drizzle, run generate and apply the schema yourself (installation).

Watch out for

You own the patching. The 2026-11-03 release fixed 12 advisories, 1 critical (Expo authorization proxy), 2 high (phone numbers claimed before verification, desktop sign-in returning the server secret), 8 medium and 1 low. Two medium ones matter in any setup: OAuth sign-in could treat an unverified provider email as verified, and revoked sessions could stay valid with secondary storage or the cookie cache. Update every @better-auth/* package to the same version (security release). Version 1.7.0 added a required issuer column to the account table; 1.7.3 reverted it, and databases that already migrated need a manual cleanup (account change).

Better Auth on GitHub