better-auth-core
Installation
SKILL.md
Better Auth Core (TypeScript)
Goals
- Set up a Better Auth instance with environment variables and data layer wiring.
- Wire server handlers and a client instance.
- Use sessions and server-side API methods safely.
- Keep data-layer choices pluggable (drivers or adapters).
Quick start
- Install
better-auth. - Set
BETTER_AUTH_SECRET(32+ chars) andBETTER_AUTH_URL. - Create
auth.tsand exportauth. - Provide
database(driver or adapter) or omit for stateless sessions. - Mount a handler (
auth.handleror a framework helper). - Create a client with
createAuthClient.
import { betterAuth } from "better-auth";