What is Better Auth?
Better Auth is an open source TypeScript authentication framework that adds sign-in, sessions and account management to a web app without tying it to a hosted vendor. It is built by Better Auth Inc and works with frameworks such as Next.js, Nuxt, SvelteKit, Hono, Expo and TanStack Start. The main problem it solves is ownership: teams get a complete auth layer inside their own codebase and database instead of paying per user for an external identity service.
Key features
- Email and password plus social sign-in. Email and password are built in, and social providers such as GitHub are configured in the same auth instance.
- Framework adapters. Official helpers mount the auth handler in Next.js, Nuxt, SvelteKit, Hono, Express, Astro, Elysia, Expo and other frameworks.
- Database adapters. The core connects to SQLite, PostgreSQL or MySQL directly, with built-in adapters for Drizzle, Prisma and MongoDB.
- Plugins. Optional plugins add passkeys, magic links, usernames, two-factor authentication, organizations, multi-tenancy and SSO.
- CLI schema tools. The command
npx auth@latest generatecreates the ORM schema or SQL migration the library needs, andmigrateapplies it with the built-in adapter. - Managed infrastructure. An optional dashboard adds audit logs, security detections, SSO, directory sync and transactional email for teams that want hosted operations around the self-hosted framework.
Who is Better Auth for?
TypeScript and JavaScript teams building a SaaS product, internal tool or consumer app who want auth code they control. It fits startups that expect user growth and want to avoid per-user pricing, teams with strict data residency or compliance needs, and developers who prefer working inside their own framework rather than adding a separate identity dashboard.
Use cases
- Adding email, password and GitHub sign-in to a Next.js or Nuxt app.
- Running passkeys and two-factor authentication for a security-conscious product.
- Giving each customer organization its own workspace with the organization and multi-tenancy plugins.
- Connecting enterprise customers through SAML or OIDC single sign-on.
Pricing
The Better Auth framework is free and open source. Managed infrastructure starts with a Starter plan at $0 per month, which includes one dashboard seat, 10,000 audit logs per month and 1,000 security detections. Pro costs $20 per month and adds unlimited seats, 20,000 audit logs and 10,000 security detections, one SSO connection and one directory sync connection. Enterprise pricing is custom. See the official Better Auth pricing page.
What's new
Version 1.7.14 was published on 26 October 2026. It fixed two-factor TOTP so imported Base32 secrets stored as base32:<secret> are accepted, and it fixed Kakao sign-in to forward the login hint. Read the 1.7.14 release notes.
Getting started
- Install the package with
npm install better-auth. - Add
BETTER_AUTH_SECRETandBETTER_AUTH_URLto your environment file. - Create
auth.tswithbetterAuth({...}), configure the database, and enable email and password or a social provider.
npm install better-auth
npx auth@latest generateAlternatives
- Clerk is a hosted authentication and user management service.
- SuperTokens is an open source auth platform with self-hosted and managed options.
- Logto is an open source identity and access management product.
FAQ
Is Better Auth free?
Yes, the framework is free and open source. The paid Starter, Pro and Enterprise plans cover optional managed infrastructure such as audit logs, security detections, SSO and directory sync.
What is Better Auth used for?
Better Auth adds sign-in, sessions, social providers and account management to TypeScript applications. It keeps the auth code and user data in your own project and database.
Does Better Auth work with Next.js?
Yes. It ships with helpers for Next.js App Router and Pages Router, along with Nuxt, SvelteKit, Hono, Express, Astro, Elysia, TanStack Start and Expo.
Better Auth vs Clerk?
Better Auth is an open source framework that you host and extend, with no per-user fee. Clerk is a hosted service that includes prebuilt UI and user management. Teams that want control over data and cost often choose Better Auth, while teams that want a managed product with less setup often choose Clerk.
Yes. The framework runs inside your application and stores data in your database. The optional paid infrastructure is separate from the self-hosted auth layer.

