What problem does it solve?
Better Auth removes the heavy lifting of building secure, production-grade authentication and authorization systems for TypeScript applications by providing a configurable, plugin-driven framework that covers email/password, social OAuth, passkeys, 2FA, sessions, RBAC, and rate limiting.
Core Features & Use Cases
- Built-in auth methods: Email/password, OAuth providers (GitHub, Google, Discord, etc.), magic links, and phone/email OTP flows.
- Advanced security: Two-Factor Authentication (TOTP), passkeys/WebAuthn, backup codes, and device trust management.
- Multi-ORM & multi-database support: Adapters and schema generation for Prisma, Drizzle, Kysely, and MongoDB with migration guidance.
- Operational tooling: Session management, rate limiting, organization/multi-tenant support, account linking, and audit-friendly schemas.
- Use Case: Ship authentication for a Next.js or SvelteKit app quickly with Prisma-backed users, GitHub OAuth sign-in, optional 2FA, and seamless session handling.
Quick Start
Generate an auth.ts configuration for your project, enable email/password plus GitHub OAuth, and produce a .env with BETTER_AUTH_SECRET and provider credentials.