better-auth Documentation
Better Auth documentation. Use for TypeScript authentication, OAuth, email/password, 2FA, organizations, sessions, and framework-agnostic auth.
Quick Reference
| Task | Entry Point |
|---|---|
| Getting started | contents/introduction.mdx |
| Installation | contents/installation.mdx |
| Basic usage | contents/basic-usage.mdx |
| Configuration options | contents/reference/options.mdx |
| Database adapters | contents/adapters/ |
| OAuth providers | contents/authentication/ |
| Plugins | contents/plugins/index.mdx |
| Framework integrations | contents/integrations/ |
| Error reference | contents/reference/errors/index.mdx |
When to use
Use this skill when the user asks about:
- Setting up authentication with Better Auth (email/password, OAuth, magic links, OTP, passkeys)
- Configuring social login providers (Google, GitHub, Apple, Microsoft, etc.)
- Using Better Auth plugins (2FA, organizations, admin, API keys, JWT, SSO, OIDC, etc.)
- Integrating Better Auth with frameworks (Next.js, Nuxt, Astro, SvelteKit, Hono, Express, etc.)
- Database adapter setup (Prisma, Drizzle, MongoDB, PostgreSQL, MySQL, SQLite)
- Session management, cookies, rate limiting, and security
- Migrating from other auth providers (NextAuth, Auth0, Clerk, Supabase)
How to find information
- First, read
TOC.mdfor complete file listing organized by directory - Identify relevant section based on user's question
- Read specific files for details
TOC.md contains all files organized by directory - always check it first.

