Better Auth
TypeScript authentication framework with plugins for sessions, OAuth, and passkeys.
Overview
Better Auth is a comprehensive authentication framework designed for TypeScript applications. It provides a composable, plugin-based architecture that lives inside your application code—version controlled, type-safe, and reviewable in pull requests.
The framework supports 20+ frameworks including Next.js, Nuxt, SvelteKit, Astro, and Hono. It includes built-in credential authentication, social sign-on, multi-tenancy, enterprise features like SSO and SAML 2.0, and advanced authentication methods such as passkeys, magic links, and API keys.
Better Auth also offers infrastructure integration through dash.better-auth.com, providing dashboard functionality, audit logs, real-time threat detection, and enterprise security features for self-hosted deployments.
Key features
- Composable plugin-based architecture
- 20+ framework support
- Built-in credential and social authentication
- Multi-tenancy with teams and roles
- Enterprise SSO and SAML 2.0
- Passkeys and magic links
- Real-time threat detection
- Audit logs and user management
- MCP auth for AI agents
- Bot detection and IP blocking
- Code-first, version-controlled configuration
- Extensive authentication method support
- Enterprise-ready with SSO and SCIM
- Active community with 900+ contributors
- Real-time security detection
- Flexible self-hosted infrastructure option
- Requires TypeScript knowledge
- Self-hosting infrastructure adds operational complexity
- Learning curve for advanced features like plugins
Best for
Alternatives
More Auth
Compare allOpen-source identity broker with SSO, OIDC, SAML, and user federation for enterprises.