BetterAuth
Last verified 2026-11-30 · Reviewed by guptadeepak
Editorial verdict
BetterAuth is the most-discussed code-first OSS auth library in the TypeScript ecosystem in 2026, strict MIT, bring-your-own-database, plugin-architecture extensible, and a DX that feels like a modern framework primitive rather than a SaaS. The trade-off is that auth runs in your own app, so even with the optional paid Infrastructure dashboard the team owns the operational burden, the compliance story, and the production runtime. For teams that want auth as a library rather than a service, BetterAuth is a strong default; for teams that want managed compliance and SLAs, look elsewhere.
Last verified by @guptadeepak on 2026-11-30.
At a glance
- Best for
- TypeScript / Next.js teams that prefer code-first auth as a library, not a service
- Pricing
- free-open-source
- Free tier
- Unlimited
- Deployment
- self-hosted
- SOC 2 Type II
- No
- Passkeys
- Native
- Self-host
- Yes
- Open source
- Yes
Funding & business
- Funding model
- Venture-backed
- Total raised
- $5M
- Latest round
- Seed · $5M · 2025
- Years in business
- 2 yrs
- Round led by
- Peak XV Partners
- Profitable
- Not disclosed
Open-source TypeScript auth framework started by Bereket Engida; $5M seed led by Peak XV (June 2025). Took over maintenance of Auth.js in 2025. The Better Auth team announced it is joining Vercel on 7 July 2026.
Funding data from primary source. See also the CIAM investor landscape.
Strengths
- Code-first auth library with strict TypeScript-first DX, feels like a modern framework primitive rather than a hosted SaaS.
- Plugin architecture makes the surface composable, pull in only the auth methods you actually use.
- Strict MIT licensing; bring your own database; no vendor lock-in.
- Rapidly growing community in the TypeScript ecosystem; widely cited as the modern OSS code-first auth pick.
Limitations
- Auth runs in your own app and database; the paid Infrastructure add-on covers a dashboard, audit logs and detections, not hosting, so operations stay with the team.
- No compliance attestations, the library cannot deliver SOC 2 / ISO / HIPAA on its own.
- SAML and OIDC SSO ship as a plugin, but self-service SSO setup for customers needs the paid Infrastructure plan, and the admin tooling is thinner than WorkOS.
- Fast-evolving, API stability is improving but breaking changes still occur between minor versions.
Capability matrix
Every vendor scored on the same axes. See the methodology for criteria.
| Password authentication | Yes |
|---|---|
| Social login | Yes |
| Magic links | Yes |
| SMS OTP | Yes |
| Email OTP | Yes |
| TOTP (authenticator app) | Yes |
| Push MFA | No |
| WebAuthn / passkeys | Yes |
| Biometric | Yes |
| Hardware security keys | Yes |
| SAML SSO | Yes |
| OIDC SSO | Yes |
| OAuth 2.0 SSO | Yes |
| Enterprise federation | Partial |
| Passwordless-only flows | Yes |
| Adaptive MFA | No |
| Step-up auth | Partial |
| RBAC | Yes |
|---|---|
| ABAC | No |
| ReBAC | No |
| FGA engine | No |
| API authorization | Yes |
| Fine-grained permissions | Partial |
| Self-service registration | Yes |
|---|---|
| Progressive profiling | No |
| Self-service account | Yes |
| Bulk user import | Yes |
| Admin user search | Yes |
| Custom user metadata | Yes |
| Organizations / tenants | Yes |
| Multi-tenancy | Yes |
| SCIM provisioning | Partial |
| REST API | Yes |
|---|---|
| GraphQL API | No |
| SDKs | js, node, react, next, vue, svelte, remix, nuxt, solid |
| CLI | Yes |
| Terraform provider | No |
| Local emulator | Yes |
| Extension model | Plugin architecture (typed) + custom hooks |
| Bot detection | No |
|---|---|
| Breached password detection | Yes |
| Brute-force protection | Yes |
| Anomaly detection | No |
| Log streams | Partial |
| Audit logs | Yes |
| GDPR data export | Yes |
| PII minimization | Partial |
| Post-quantum roadmap | No |
| MCP support | Yes |
|---|---|
| OAuth 2.1 | Yes |
| Dynamic client registration | Yes |
| Agent vs human token separation | No |
| Web Bot Auth | No |
| SOC 2 Type II | No |
|---|---|
| ISO 27001 | No |
| ISO 27018 | No |
| HIPAA | No |
| PCI DSS | No |
| GDPR | Yes |
| CCPA | Yes |
| FedRAMP | No |
| EU data residency | Yes |
| Consent management | No |
|---|---|
| Preference center | No |
| Purpose-specific consent | No |
| Integrates with CMPs | n/a |
| Multi-region deployment | Partial |
|---|---|
| Data residency control | Yes |
| Proven at high scale (1M+ MAU) | No |
| Password-hash import | Partial |
|---|---|
| Lazy / just-in-time migration | No |
| Account linking & dedup | Partial |
| Custom domains per brand | No |
| Per-brand theming of all flows | No |
| Per-brand consent partitioning | No |
| Deletion webhooks / cascade | No |
| Event streaming / webhooks | Partial |
| Documented rate limits | No |
Developer experience & lock-in
Editorial 1–5 scores and migration effort, scored on the same axes for every vendor. See the methodology for how these are graded.
Developer experience
- Community
- Medium
- GitHub stars
- 30,943
Migration & lock-in
Low lock-inEffort to adopt this platform
Effort to leave later (your exit cost)
Open source and self-hostable, so you keep full data and deployment portability regardless of the score above.
Enterprise readiness
Mostly ready · 66/100A computed read of how ready this vendor is to sell into the enterprise, derived from the capability matrix. See the enterprise-ready pillars.
- 85
Enterprise SSO
SAML SSO · OIDC SSO · Enterprise federation (partial)
- 65
Directory sync (SCIM)
Organizations · SCIM provisioning (partial)
- 100
Organizations & tenancy
Organizations · Multi-tenancy
- 60
RBAC & custom roles
RBAC · Fine-grained permissions (partial)
- 80
Audit logs & streaming
Audit logs · Log streaming (partial)
- 0
Compliance certifications
- 60
Security posture
Brute-force protection · Breached-password checks · Adaptive / step-up auth (partial)
Scored from our capability review; confirm the exact plan tier and SCIM scope with the vendor before you commit.
Pricing
| 10,000 MAU | $50/mo |
|---|---|
| 100,000 MAU | $200/mo |
| 500,000 MAU | $800/mo |
| 1,000,000 MAU | $1,600/mo |
- Library is free under MIT, pay only operational cost
- Bring your own database (Postgres / MySQL / SQLite / MongoDB)
- Optional Better Auth Infrastructure (launched January 2026): Starter free, Pro US$20 per month with dashboard, audit logs and security detections; auth still runs in your app
- Infrastructure Pro includes 1 self-service SSO and 1 Directory Sync connection, then US$50 per month per extra connection
Estimates use the standard assumptions in our methodology. Always confirm with the vendor.
Best for
- TypeScript / Next.js teams that prefer code-first auth as a library, not a service
- Self-hosted-only environments without managed-CIAM tolerance
- Greenfield startups that want to own the auth layer architecture
Not for
- Teams without operational capacity to run auth as part of their own infrastructure
- Workloads requiring SOC 2 / HIPAA / ISO 27001 / PCI DSS attestation at the auth layer
- Production B2B SaaS with serious enterprise federation requirements
Solves for
Enterprise pain points this vendor covers on the mapped capabilities. See all pain points.
FAQ
- Is BetterAuth a CIAM platform or an auth library?
- An auth library. BetterAuth is installed via npm and runs inside your own application's runtime, backed by your own database. Since January 2026 an optional paid Infrastructure plan adds a dashboard, audit logs, security detections and self-service SSO, but it does not host your auth. This is materially different from SaaS CIAM and from self-hosted products like Keycloak or FusionAuth.
- How does BetterAuth compare to NextAuth.js (Auth.js)?
- Both are code-first TypeScript auth libraries for Next.js and adjacent frameworks, and since 2025 the Better Auth team also maintains Auth.js (formerly NextAuth.js). BetterAuth has a cleaner API surface, better TypeScript ergonomics, and a more composable plugin architecture; Auth.js has the older ecosystem. For new projects, BetterAuth is the one its own maintainers point to.
- Should I use BetterAuth or a SaaS CIAM?
- If you want auth as a library you control completely, BetterAuth. If you want managed compliance attestations, hosted login, vendor SLAs, or to avoid running auth infrastructure yourself, pick a SaaS CIAM (Auth0, Clerk, Stytch, Kinde). The choice is architectural, not feature-based.
Sources
- BetterAuth Documentationaccessed 2026-11-30
- BetterAuth GitHubaccessed 2026-11-30
- Better Auth Pricingaccessed 2026-11-30
- Better Auth is joining Vercelaccessed 2026-11-30
- Better Auth MCP pluginaccessed 2026-11-30
- Better Auth SSO pluginaccessed 2026-11-30
Where to next
What BetterAuth is
BetterAuth is an open-source code-first auth library for the TypeScript / Next.js ecosystem, started in 2024 and widely adopted through 2025 and 2026. In 2025 its team took over maintenance of Auth.js (formerly NextAuth.js), and on 7 July 2026 the team announced it is joining Vercel, saying auth stays open source and framework agnostic. It is installed via npm, runs inside the application's own runtime, persists to a database the team owns, and exposes a plugin architecture for composing auth methods. An optional paid Infrastructure plan (from January 2026) adds a dashboard, audit logs and security detections, but BetterAuth is still a library, not a hosted service.
Where BetterAuth wins
Code-first DX at the level of modern framework primitives. Strict MIT licensing, bring-your-own-database, no vendor lock-in. Plugin architecture means the auth surface composes cleanly, pull in passkey support, social login, organizations, and rate limiting as separate plugins rather than monolithic configuration. Rapidly growing TypeScript ecosystem mindshare.
Where BetterAuth hurts
Auth runs in your own stack, so the team owns operational and compliance responsibility; there is no SOC 2 attestation BetterAuth can deliver on your behalf. SAML and OIDC SSO are available as a plugin, but self-service SSO setup for your customers needs the paid Infrastructure plan. Fast-evolving codebase still has breaking changes between minor versions occasionally. For production B2B SaaS with serious compliance or federation requirements, a SaaS CIAM is usually the better answer.
How BetterAuth compares
The most relevant comparisons are BetterAuth vs Auth.js for the code-first library decision, Stack Auth vs BetterAuth for the OSS-Next.js-first call, and Auth0 vs BetterAuth for the library-vs-service architectural decision. For self-hosted-managed alternatives, SuperTokens, Keycloak, and Zitadel are the natural comparisons.
Editorial changelog (2 entries)
Updated legal_name, URLs, pricing (paid Infrastructure plans), sso_saml, mcp_support, dynamic_client_registration, funding source and Vercel news from better-auth.com pricing, blog and plugin docs; github_stars added.
Capability matrix and pricing bands re-verified against the vendor's latest documentation and changelog.
