What problem does it solve?
This Skill documents how to correctly integrate Better Auth into TypeScript applications, removing guesswork around configuration, session management, plugin usage, and production security so teams can ship reliable authentication without costly mistakes.
Core Features & Use Cases
- Config & Environment: Explains required environment variables, config locations, and how to supply secrets and base URLs safely.
- Session & Storage Strategies: Covers cookie cache strategies, secondary storage for sessions, and options for stateless vs persisted sessions.
- Adapters, Plugins & Hooks: Describes adapter choices for Drizzle/Prisma/SQLite, plugin import patterns, and endpoint/database hooks for customization.
- Security & Best Practices: Highlights secure cookie settings, CSRF/origin handling, rate limiting, and migration/CLI reminders for production readiness.
- Use Case: Integrate email/password plus Google OAuth with a Drizzle adapter, store sessions in Redis for scale, and add two-factor and passkey plugins while enforcing secure cookies.
Quick Start
Install and configure Better Auth by setting BETTER_AUTH_SECRET and BETTER_AUTH_URL and adding an auth.ts configuration with the chosen database adapter, session strategy, and required plugins.