better-auth-best-practices
Better Auth Integration Guide
Always consult better-auth.com/docs for code examples and latest API.
Better Auth is a TypeScript-first, framework-agnostic auth framework supporting email/password, OAuth, magic links, passkeys, and more via plugins.
Quick Reference
Environment Variables
BETTER_AUTH_SECRET- Encryption secret (min 32 chars). Generate:openssl rand -base64 32BETTER_AUTH_URL- Base URL (e.g.,https://example.com)
Only define baseURL/secret in config if env vars are NOT set.
File Location
CLI looks for auth.ts in: ./, ./lib, ./utils, or under ./src. Use --config for custom path.
More from lukevella/rallly
devmoji
Devmoji commit message emoji conventions. Use when writing git commit messages, formatting commit descriptions, or choosing the right emoji prefix for a commit. Triggers on "commit message", "git commit", "commit emoji", "devmoji".
17logging
Wide events logging pattern and conventions for this project. Use when writing logging code, adding observability, or implementing request tracing.
1create-auth-skill
Skill for creating auth layers in TypeScript/JavaScript apps using Better Auth.
1email-and-password-best-practices
This skill provides guidance and enforcement rules for implementing secure email and password authentication using Better Auth.
1organization-best-practices
This skill provides guidance and enforcement rules for implementing multi-tenant organizations, teams, and role-based access control using Better Auth's organization plugin.
1two-factor-authentication-best-practices
This skill provides guidance and enforcement rules for implementing secure two-factor authentication (2FA) using Better Auth's twoFactor plugin.
1