Setup & Installation
What This Skill Does
Covers Better Auth server and client setup, including database adapter configuration, session management, plugin integration, and environment variable handling. Targets TypeScript projects using email/password auth, OAuth providers, or plugin-based features like two-factor and magic links.
Better Auth has enough config surface area that small mistakes like confusing ORM model names with table names or missing a CLI re-run after adding plugins break auth silently, so having the exact rules in context prevents those bugs without digging through the docs each time.
When to use it
- Setting up a Better Auth server with Drizzle or Prisma adapter
- Adding OAuth providers like Google alongside email/password login
- Configuring session storage with Redis as secondary storage
- Wiring in plugins like twoFactor or magicLink with correct import paths
- Mapping ORM model names to database tables without breaking migrations