What problem does it solve? Setting up TypeScript authentication with Better Auth involves many moving parts—environment variables, database adapters, session strategies, plugins, and migrations—and misconfiguring any of them leads to broken logins, missing schema tables, or insecure sessions. This Skill provides a structured reference so you configure Better Auth correctly the first time. ## Core Features & Use Cases - Setup Workflow: Step-by-step installation, environment variables, auth.ts creation, route handlers, and CLI migrations for built-in, Drizzle, and Prisma adapters. - Session & Security Configuration: Guidance on cookie cache strategies (compact, JWT, JWE), secondary storage, rate limiting, CSRF, and cross-subdomain cookies. - Plugins & Hooks: Tree-shakable plugin imports (twoFactor, organization, passkey, magicLink, and more) plus endpoint and database hooks for custom logic. - Use Case: You are adding email/password and Google OAuth login to a Next.js app backed by Drizzle and PostgreSQL. Use this Skill to generate the schema with the CLI, wire the adapter, configure social providers, and avoid the common model-name-versus-table-name pitfall. ## Quick Start Set up Better Auth in my Next.js project with a Drizzle PostgreSQL adapter, email and password sign-in, and Google OAuth, then run the schema migration.