Works with your stack.
Next.js, Nuxt, SvelteKit, Astro, Hono, and 20+ more.
Auth that lives inside your app. Composable, plugin-based, and built to scale — powering from weekend projects to the biggest consumer and enterprise apps on the planet.
npx auth initTrusted by
Next.js, Nuxt, SvelteKit, Astro, Hono, and 20+ more.
Sessions, email verification, and password reset included.
Google, GitHub, Apple, Discord, and more.
Teams, roles, invitations, and access control.
SSO, SAML 2.0, SCIM, and directory sync.
Passkeys, magic links, API keys, JWTs, and more.
MCP auth, token-exchange, and agent delegation.
Bot detection, IP blocking, and email validation.
Manage users, sessions, and organizations.
The most comprehensive authentication framework for TypeScript.
1import { betterAuth } from "better-auth"2 3export const auth = betterAuth({4 emailAndPassword: {5 enabled: true,6 },7 socialProviders: {8 google: {9 clientId: process.env.GOOGLE_CLIENT_ID!,10 clientSecret: process.env.GOOGLE_CLIENT_SECRET!,11 },12 github: {13 clientId: process.env.GITHUB_CLIENT_ID!,14 clientSecret: process.env.GITHUB_CLIENT_SECRET!,15 },16 },17 plugins: [twoFactor(), passkey()], // 50+ more18})No dashboard clicks. Your auth lives in code — version controlled, type-safe, and reviewable in PRs.
Active Users
1,284
New Users
312
Sessions
5,907
Real-time threat detection before it reaches your users.
Dashboard, audit logs, security detection, transactional comms, and more.
Built by a community of 876+ contributors.
Roll your own auth with confidence in minutes.