better-auth-best-practices

Configure Better Auth server and client with adapters, sessions, and plugins.

Updated Apr 24, 2026
One-click install
npx skills add https://github.com/Katlyng/proy_vibetribe --skill better-auth-best-practices-katlyng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth-best-practices
Source: https://github.com/Katlyng/proy_vibetribe/tree/main/.agents/skills/better-auth-best-practices
Command: npx skills add https://github.com/Katlyng/proy_vibetribe --skill better-auth-best-practices-katlyng

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configuring Better Auth across a TypeScript project can be verbose and error-prone. This Skill provides a structured guide to set up the server and client, connect database adapters, manage sessions, and integrate plugins while handling environment variables.

Core Features & Use Cases

  • Guided setup workflow: install, env vars, auth.ts, and migrations
  • Flexible configuration: adapters, session strategies, plugins
  • Developer scenarios: TypeScript authentication with email/password, OAuth, and plugin-based security

Quick Start

Install better-auth, set BETTER_AUTH_SECRET and BETTER_AUTH_URL, create an auth.ts with your adapter and config, and run migrate to initialize the schema.

Frequently Asked Questions about better-auth-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Better Auth environment variables for a TypeScript project?

Better Auth requires setting BETTER_AUTH_SECRET and BETTER_AUTH_URL environment variables to satisfy baseURL and secret config requirements for secure TypeScript server and client setup.

What's the best way to set up Better Auth database adapters and run migrations?

The best way to set up database adapters is to define your adapter in auth.ts and run the CLI migrate command. This initializes the schema and handles migration workflows for your TypeScript project.

Does Better Auth support OAuth and email/password authentication workflows?

Yes, Better Auth supports both OAuth and email/password authentication workflows. It configures these strategies alongside session management and plugins to secure TypeScript applications.

How do I manage sessions and integrate plugins in Better Auth?

You manage sessions and integrate plugins by configuring them within your auth.ts file. This structured setup handles session strategies and plugin-based security across server and client environments.

Why does my Better Auth setup fail without correct baseURL and appName configuration?

Better Auth setup fails because the config explicitly requires baseURL, secret, and appName values. Satisfying these requirements in your auth.ts file ensures the CLI and server run correctly.