Better Auth
Self-hosted, framework-agnostic TypeScript auth library with no vendor lock-in. The current default recommendation for teams that want to own their auth code.
What is Better Auth?
Better Auth is a self-hosted, framework-agnostic TypeScript authentication library, and the current default recommendation for teams that want to own their auth code rather than depend on a hosted vendor. It's positioned as the actively-developed successor to the space Auth.js has occupied for years, including being the option Auth.js's own maintainers now point new projects toward.
Key features
- Framework-agnostic core with adapters for Next.js, SvelteKit, and other popular frameworks
- Plugin system covering common needs (organizations, 2FA, magic links, passkeys) without bloating the core
- Full control over the database schema and session handling since everything runs in your own infra
- TypeScript-first with strong type inference across the auth flow
- Actively maintained, with the ecosystem's own migration momentum currently pointing toward it
Who it's for
Good fit for teams that want auth code they own and can fully customize, without paying a per-user vendor fee. If you'd rather ship a login screen today and not think about auth infrastructure at all, Clerk or Auth0 trade that ownership for speed.
Pricing
Free and open source, no hosted service fee, you pay only for your own infrastructure.