better-auth-complete-guide
Installation
SKILL.md
Better Auth Complete Guide
Better Auth is a framework-agnostic authentication (and authorization) library for TypeScript. It provides comprehensive features out of the box with a plugin ecosystem for advanced functionalities like 2FA, multi-tenant support, passkeys, and more.
When to Apply
Reference these guidelines when:
- Setting up Better Auth in a new or existing project
- Configuring authentication methods (email/password, social OAuth, magic link, passkey, etc.)
- Integrating with a framework (Next.js, Nuxt, SvelteKit, Astro, Hono, Express, etc.)
- Setting up database adapters (Prisma, Drizzle, MongoDB, raw SQL)
- Implementing session management, cookie caching, or secondary storage
- Adding plugins (2FA, organization, admin, API keys, anonymous auth, etc.)
- Building client-side auth UI with React, Vue, Svelte, Solid, or vanilla JS
- Securing API routes with middleware and rate limiting
- Running CLI commands (migrate, generate)