Security & Privacy · Identity & Access Management (IAM)
Better Auth
Composable TypeScript authentication inside your application
Better Auth is an MIT licensed, framework agnostic authentication and authorization framework for TypeScript. It embeds authentication in an application backend, supports application managed databases and stateless sessions, and offers email, password, social sign on, passkeys, magic links, usernames, and extensible plugins. Better Auth joined Vercel on July 7, 2026, while its open source framework remains framework and platform agnostic.
Acquired. The Better Auth team joined Vercel on July 7, 2026. The framework stays MIT licensed and platform agnostic.
Key facts
- License
- MIT
- Main language
- TypeScript
- Maintainer
- Vercel, following the July 7, 2026 Better Auth announcement
- Latest release
- v1.7.12, October 20, 2026
- GitHub stars
- 30,341, October 2026
- Hosted option
- Infrastructure Starter $0/month; Pro $20/month; Enterprise custom
What Better Auth is
Better Auth is a framework agnostic authentication and authorization framework for TypeScript. Its GitHub repository was created on May 19, 2024, and the lists 30,341 stars, 2,986 forks, 879 open issues, and the MIT License. The project announced a $5 million seed round on June 24, 2025, led by Peak XV Partners, with participation from Y Combinator, Chapter One, P1 Ventures, investors, and angels. The repository lists TypeScript, HTML, Svelte, and Vue among its languages. The repository creation date is not a first release date. The official July 7, 2026 announcement says Better Auth joined Vercel to accelerate open source authentication and secure agent workflows. Vercel is now the maintainer of the project.
How it works
Better Auth provides a TypeScript package that applications configure as an authentication instance with a secret, base URL, authentication methods, and an optional database. Built in methods include email and password authentication and social sign on. Plugins add passkeys, usernames, magic links, and other methods. The handler accepts standard Request and Response objects, with helpers documented for Next.js, Node.js, SvelteKit, SolidStart, Astro, Express, Hono, Elysia, TanStack Start, and other JavaScript environments. Client packages support vanilla JavaScript and several frontend frameworks. The CLI generates ORM schemas or SQL migration files, while the built in Kysely adapter can apply migrations directly. This arrangement keeps authentication routes and configuration within application code.
Architecture and recent releases
The installation documentation describes SQLite, PostgreSQL, MySQL, MongoDB, Drizzle, Prisma, other adapters, and stateless sessions without a database. Most plugins require persistent storage, so a stateless core does not remove storage planning for expanded capabilities. The CLI can generate an ORM schema or SQL migration file, and its migrate command creates required tables directly for the built in Kysely adapter. Release v1.7.12 was published October 20, 2026. It corrected JWT algorithm verification, added warnings for absent JWT issuer or audience values, aligned OAuth proxy callbacks with standard checks, preserved underlying database errors, and tightened provider and token validation. Version 1.8.0-beta.1 was listed October 16, 2026.
License and pricing
The repository uses the MIT License, which permits use, copying, modification, merging, publication, distribution, sublicensing, and sale when required copyright and permission notices remain. Better Auth Infrastructure is a separate optional layer connected to self hosted deployments. Its pricing lists Starter at $0 per month, Pro at $20 per month, and Enterprise at custom pricing. Starter includes one dashboard seat, 10,000 monthly audit logs, one day retention, 1,000 monthly security detections, and community support. Pro includes unlimited seats, seven day audit retention, higher included limits, self service SSO, directory synchronization, transactional email and SMS, templates, abuse protection, and email support. Several features carry usage or connection charges.
Limitations and how it compares
Better Auth leaves deployment, database operations, secrets, schema changes, application routes, and surrounding production controls with the application team. That ownership model fits TypeScript teams that want authentication embedded in backend code and user data held in their own database. The July 7, 2026 Vercel announcement states that the project remains open source, framework agnostic, and platform agnostic, while its team joins Vercel to work on authentication and secure agent workflows. The acquisition changes stewardship rather than the core license. Infrastructure can add dashboard, audit, detection, messaging, SSO, and directory capabilities, but teams choosing the framework alone must operate the supporting systems required by their selected authentication flows.
Main features
- Email authentication. Built in email and password authentication supports application configured account creation and sign in flows.
- Social sign on. Built in social provider configuration connects applications to configured identity providers through documented authentication settings.
- Authentication plugins. Plugins add passkeys, usernames, magic links, and additional authentication methods without changing the core integration pattern.
- Framework handlers. Standard Request and Response handling supports documented JavaScript frameworks through framework specific helper functions.
- Database adapters. Documented options include SQLite, PostgreSQL, MySQL, MongoDB, Drizzle, Prisma, and other supported adapters.
- Schema CLI. The CLI generates ORM schemas or SQL migration files and applies migrations directly with the built in Kysely adapter.
Self-hosting Better Auth
Install Better Auth with npm, pnpm, Yarn, or Bun, then create an authentication instance inside the application. The documentation requires a high entropy secret of at least 32 characters and a base URL. Configure SQLite, PostgreSQL, MySQL, MongoDB, Drizzle, Prisma, another adapter, or stateless sessions. Generate ORM schemas or SQL migrations with the CLI, apply tables, mount the handler on authentication routes, and configure selected methods. Teams remain responsible for hosting, TLS, databases, secrets, email, SMS, backups, monitoring, rate limits, schema changes, and upgrades. No minimum CPU or RAM requirement is published.
Strengths
- The MIT License permits commercial use, modification, distribution, and private deployment.
- Authentication configuration remains inside the TypeScript application.
- Plugins cover passkeys, usernames, magic links, and additional methods.
- Teams can use their own database or stateless sessions.
Drawbacks
- Teams remain responsible for deployment, secrets, databases, and schema operations.
- Most plugins require persistent database storage.
- Infrastructure services add separate usage and connection charges.
What teams replace with it
Teams usually evaluate Better Auth when they want to move off Auth0, Clerk, Firebase Authentication.
For side-by-side commercial comparisons, browse our alternatives hub.
Open-source alternatives to Better Auth
Frequently asked questions
Is Better Auth free?
The framework is free and distributed under the MIT License. It can run in an application without an Infrastructure subscription. Optional Infrastructure has a Starter tier priced at $0 per month, including one dashboard seat, 10,000 monthly audit logs, one day retention, 1,000 monthly detections, and community support.
Can it be used commercially?
Yes. The MIT License permits use, copying, modification, publication, distribution, sublicensing, and sale. Copies or substantial portions must retain the copyright and permission notice. The repository identifies Better Auth as MIT licensed, so commercial and private deployment are permitted under those notice requirements.
Which databases are supported?
The installation documentation provides examples for SQLite, PostgreSQL, MySQL, and MongoDB. It also documents Drizzle, Prisma, other adapters, and stateless sessions without a database. Most plugins require persistent storage, so teams should plan database capacity when enabling expanded authentication functionality.
How is Better Auth integrated?
Create an authentication instance, configure its secret, base URL, methods, and database when applicable, then mount its handler on application routes. The handler uses standard Request and Response objects. Framework helpers and client packages are documented for several JavaScript frameworks and frontend environments.
What does Infrastructure add?
Infrastructure connects to a self hosted Better Auth deployment and adds dashboard access, audit logs, security detection, and support tiers. Pro lists transactional email and SMS, self service SSO, directory synchronization, email templates, abuse protection, and email support. Usage, connection, dashboard domain, and log drain charges may apply.
Similar projects to compare
- SuperTokensApache-2.0 outside ee; ee directory under separate licenseSuperTokens is an open-core authentication provider for developers adding login, sessions, user administration, and identity features to applications. The core outside the ee directory uses Apache-2.0, while the ee directory has a separate license. Teams can self-host the free open-source features or use SuperTokens Cloud, priced at $0.02 per monthly active user and free below 5,000 users.
- KeycloakApache-2.0Keycloak is an Apache-2.0 identity and access management server for applications and services. It provides user federation, strong authentication, user management, fine-grained authorization, and OIDC and SAML integrations. Teams can run it from downloadable archives, a container image, or an operator. Red Hat also publishes a supported commercial build, while community deployments require operators to provide infrastructure, security configuration, databases, upgrades, and ongoing administration.
- OryApache-2.0Ory is a Go-based collection of cloud-native identity and access services. Kratos manages identity and user flows, Hydra provides OAuth 2.0 and OpenID Connect, Keto evaluates authorization policies, and Oathkeeper protects services at the request boundary. The repositories use Apache-2.0. Ory also offers Network as a managed service and an Enterprise License for supported self-hosting.
- AuthentikMIT (core), mixed repository; enterprise code under separate enterprise licenseAuthentik is an open-source identity provider for teams needing OIDC, OAuth2, SAML, LDAP, RADIUS, SCIM, and proxy access in one self-hosted service. Its core is MIT licensed, while enterprise code is separately licensed. There is no general hosted cloud product advertised, and enterprise pricing starts at $0.02 per external user monthly when billed annually.
- AuthgearApache-2.0Authgear is an Apache-2.0 open-source authentication and user-management platform maintained by Skymakers Digital Ltd. It supports self-hosting and Authgear Cloud, with a Free plan priced at $0 monthly. Documented capabilities include passwordless login, passkeys, MFA, social and enterprise login, SSO, user management, APIs, customizable interfaces, user import, and export.
- CerbosApache-2.0Cerbos is an open-source authorization layer with a stateless Policy Decision Point that evaluates context-aware YAML policies for applications, gateways, workloads, services, and AI agents. It exposes HTTP and gRPC APIs, runs in customer infrastructure, and supports Git, disk, cloud, and database policy storage. Cerbos Hub adds hosted authoring, testing, distribution, and audit management from $25 per month.
Sources
Last updated 2026-10-22.