
This is a reference guide for integrating Better Auth, a TypeScript authentication framework that handles email/password, OAuth, passkeys, and magic links through plugins. The writeup covers the stuff that trips people up: model names versus table names in database configs, how sessions end up in secondary storage by default instead of your DB, and why you need to rerun migrations after adding plugins. It walks through environment variables, CLI commands, session strategies (including fully stateless mode), and the hook system for customizing behavior. Good for when you're wiring up auth and need to know why your Prisma setup isn't working or how cookie caching actually behaves with custom session fields.
$ npx -y skills add pedronauck/skills --skill better-auth-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
This is a reference guide for integrating Better Auth, a TypeScript authentication framework that handles email/password, OAuth, passkeys, and magic links through plugins. The writeup covers the stuff that trips people up: model names versus table names in database configs, how sessions end up in secondary storage by default instead of your DB, and why you need to rerun migrations after adding plugins. It walks through environment variables, CLI commands, session strategies (including fully stateless mode), and the hook system for customizing behavior. Good for when you're wiring up auth and need to know why your Prisma setup isn't working or how cookie caching actually behaves with custom session fields.
Browse the repository on GitHubSponsors