# Better Auth ## Docs - [Drizzle ORM](https://mintlify.wiki/better-auth/better-auth/adapters/drizzle.md): Connect Better Auth to your database using Drizzle ORM. - [MongoDB](https://mintlify.wiki/better-auth/better-auth/adapters/mongo.md): Connect Better Auth to MongoDB using the official MongoDB adapter. - [PostgreSQL](https://mintlify.wiki/better-auth/better-auth/adapters/postgresql.md): Connect Better Auth to PostgreSQL using a connection pool or the Kysely adapter. - [Prisma](https://mintlify.wiki/better-auth/better-auth/adapters/prisma.md): Connect Better Auth to your database using Prisma ORM. - [SQLite](https://mintlify.wiki/better-auth/better-auth/adapters/sqlite.md): Connect Better Auth to SQLite for local, edge, or embedded database deployments. - [Email & Password](https://mintlify.wiki/better-auth/better-auth/authentication/email-password.md): Set up email and password authentication with sign-up, sign-in, email verification, and password reset. - [Magic link](https://mintlify.wiki/better-auth/better-auth/authentication/magic-link.md): Passwordless authentication via email magic links using the magic link plugin. - [Passkey](https://mintlify.wiki/better-auth/better-auth/authentication/passkey.md): Passwordless authentication with WebAuthn passkeys using biometrics, PINs, or security keys. - [Phone number](https://mintlify.wiki/better-auth/better-auth/authentication/phone-number.md): Authenticate users with their phone number and an OTP code using the phone number plugin. - [Social providers](https://mintlify.wiki/better-auth/better-auth/authentication/social-providers.md): Add OAuth sign-in with Google, GitHub, Apple, Discord, and many more providers. - [Two-factor authentication](https://mintlify.wiki/better-auth/better-auth/authentication/two-factor.md): Add TOTP and OTP-based two-factor authentication with backup codes and trusted devices. - [Username](https://mintlify.wiki/better-auth/better-auth/authentication/username.md): Allow users to sign up and sign in with a username using the username plugin. - [Basic usage](https://mintlify.wiki/better-auth/better-auth/basic-usage.md): Sign users up, sign them in, manage sessions, and perform common user operations with Better Auth. - [REST API](https://mintlify.wiki/better-auth/better-auth/concepts/api.md): Better Auth's built-in REST API — calling endpoints server-side, handling headers, and error handling. - [CLI Reference](https://mintlify.wiki/better-auth/better-auth/concepts/cli.md): Better Auth CLI commands for generating schemas, running migrations, and more. - [Client](https://mintlify.wiki/better-auth/better-auth/concepts/client.md): Set up the Better Auth client for React, Vue, Svelte, Solid, or vanilla TypeScript. Learn about hooks, fetch options, error handling, and client plugins. - [Database](https://mintlify.wiki/better-auth/better-auth/concepts/database.md): Configure database adapters, run migrations, use secondary storage with Redis, understand the core schema, extend tables, and control ID generation. - [Email](https://mintlify.wiki/better-auth/better-auth/concepts/email.md): Configure email verification and password reset in Better Auth — send verification links, require verified emails, auto sign-in after verification, and handle post-verification callbacks. - [Hooks](https://mintlify.wiki/better-auth/better-auth/concepts/hooks.md): Use before and after hooks to customize endpoint behavior in Better Auth — modify requests, intercept responses, handle cookies, throw errors, and run background tasks. - [OAuth](https://mintlify.wiki/better-auth/better-auth/concepts/oauth.md): Configure OAuth 2.0 social providers in Better Auth — sign in, link accounts, request scopes, pass additional data through the OAuth flow, refresh tokens, and customize provider behavior. - [Plugins](https://mintlify.wiki/better-auth/better-auth/concepts/plugins.md): Learn how to use and create Better Auth plugins — defining endpoints, schemas, hooks, middleware, rate limits, trusted origins, and client plugins with custom actions. - [Session management](https://mintlify.wiki/better-auth/better-auth/concepts/session-management.md): Understand how Better Auth manages sessions, including expiry, cookie caching, stateless sessions, secondary storage, and customizing the session response. - [TypeScript support](https://mintlify.wiki/better-auth/better-auth/concepts/typescript.md): Type inference, additional fields, plugin types, and recommended tsconfig settings for Better Auth. - [Users and accounts](https://mintlify.wiki/better-auth/better-auth/concepts/users-accounts.md): Manage users and accounts in Better Auth — update user info, change emails and passwords, delete users, link and unlink OAuth accounts, and control token encryption. - [Migrating from Clerk](https://mintlify.wiki/better-auth/better-auth/guides/clerk-migration-guide.md): Step-by-step guide to migrate users, accounts, and two-factor data from Clerk to Better Auth. - [Migrating from NextAuth.js](https://mintlify.wiki/better-auth/better-auth/guides/next-auth-migration-guide.md): Step-by-step guide to migrate from Auth.js (NextAuth.js) to Better Auth, including database schema differences and client API changes. - [Performance optimization](https://mintlify.wiki/better-auth/better-auth/guides/optimizing-for-performance.md): Database indexing, session caching, background tasks, SSR prefetching, and bundle size tips for Better Auth. - [Creating your first plugin](https://mintlify.wiki/better-auth/better-auth/guides/your-first-plugin.md): A step-by-step guide to building a Better Auth plugin with a server component, client component, schema, hooks, and custom endpoints. - [Installation](https://mintlify.wiki/better-auth/better-auth/installation.md): Install Better Auth and configure it in your project step by step. - [Expo integration](https://mintlify.wiki/better-auth/better-auth/integrations/expo.md): Integrate Better Auth with Expo for cross-platform React Native and web apps. - [Express integration](https://mintlify.wiki/better-auth/better-auth/integrations/express.md): Integrate Better Auth with Express v4 and v5, including CORS and session access. - [Hono integration](https://mintlify.wiki/better-auth/better-auth/integrations/hono.md): Integrate Better Auth with Hono, including CORS configuration and session middleware. - [Next.js integration](https://mintlify.wiki/better-auth/better-auth/integrations/next.md): Integrate Better Auth with Next.js App Router, Pages Router, and middleware. - [Nuxt integration](https://mintlify.wiki/better-auth/better-auth/integrations/nuxt.md): Integrate Better Auth with Nuxt using server routes and Vue composables. - [SvelteKit integration](https://mintlify.wiki/better-auth/better-auth/integrations/svelte-kit.md): Integrate Better Auth with SvelteKit using server hooks and Svelte stores. - [Introduction](https://mintlify.wiki/better-auth/better-auth/introduction.md): Better Auth is the most comprehensive authentication framework for TypeScript — framework-agnostic, extensible, and production-ready. - [Admin](https://mintlify.wiki/better-auth/better-auth/plugins/admin.md): Administrative tools for user management, role assignment, banning, impersonation, and access control. - [Anonymous](https://mintlify.wiki/better-auth/better-auth/plugins/anonymous.md): Allow users to sign in without any personal information, then convert to a permanent account later. - [API Key](https://mintlify.wiki/better-auth/better-auth/plugins/api-key.md): Create, manage, and verify API keys for programmatic access to your application. - [Generic OAuth](https://mintlify.wiki/better-auth/better-auth/plugins/generic-oauth.md): Connect Better Auth to any OAuth 2.0 or OIDC provider with a unified interface and pre-configured helpers for popular providers. - [JWT](https://mintlify.wiki/better-auth/better-auth/plugins/jwt.md): Issue JSON Web Tokens and verify them with a JWKS endpoint for service-to-service authentication. - [OIDC Provider](https://mintlify.wiki/better-auth/better-auth/plugins/oidc-provider.md): Turn Better Auth into a full OpenID Connect identity provider with client registration, consent flows, and JWKS endpoints. - [Organization](https://mintlify.wiki/better-auth/better-auth/plugins/organization.md): Multi-tenant organization management with roles, invitations, teams, and access control. - [Plugins](https://mintlify.wiki/better-auth/better-auth/plugins/overview.md): Extend Better Auth with plugins for authentication, authorization, API management, and more. - [Single Sign-On (SSO)](https://mintlify.wiki/better-auth/better-auth/plugins/sso.md): Enterprise SSO with SAML 2.0 and OIDC support, including automatic user provisioning and organization mapping. - [Contributing](https://mintlify.wiki/better-auth/better-auth/reference/contributing.md): How to set up a development environment, run tests, and submit pull requests to Better Auth. - [FAQ](https://mintlify.wiki/better-auth/better-auth/reference/faq.md): Frequently asked questions about Better Auth. - [Configuration Reference](https://mintlify.wiki/better-auth/better-auth/reference/options.md): Complete reference for all betterAuth() configuration options. - [Security](https://mintlify.wiki/better-auth/better-auth/reference/security.md): Security features in Better Auth — password hashing, CSRF protection, session management, trusted origins, and vulnerability disclosure. ## OpenAPI Specs - [openapi](https://mintlify.wiki/better-auth/better-auth/api-reference/openapi.json)