better-auth-best-practices

Configure Better Auth authentication with database adapters and environment variables.

426|199|Updated Aug 13, 2025
One-click install
npx skills add https://github.com/leonvanzyl/agentic-coding-starter-kit --skill better-auth-best-practices-leonvanzyl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth-best-practices
Source: https://github.com/leonvanzyl/agentic-coding-starter-kit/tree/main/.agents/skills/better-auth-best-practices
Command: npx skills add https://github.com/leonvanzyl/agentic-coding-starter-kit --skill better-auth-best-practices-leonvanzyl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configures Better Auth server and client, enabling streamlined authentication flows, database adapters, session management, and plugin support, while guiding environment variable setup.

Core Features & Use Cases

  • Guides for integrating Better Auth with server and client code, including auth.ts placement and framework routing.
  • Supports database adapters (Drizzle/Prisma) and session storage strategies with plugins and migrations.
  • Use Case: Quickly bootstrap secure authentication in TypeScript apps with email/password or OAuth.

Quick Start

Create an auth.ts with database adapters and config, then run the migration CLI and wire up framework routes and plugins.

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 for a TypeScript application?

To configure Better Auth, you create an auth.ts file with your database adapters, session management settings, and environment variables, then run the migration CLI and wire up framework routes.

Does Better Auth support database adapters like Drizzle and Prisma?

Yes, Better Auth supports database adapters like Drizzle and Prisma, allowing you to manage session storage strategies and generate necessary database migrations for your TypeScript project.

Can I use Better Auth to set up both email/password and OAuth authentication?

Yes, you can use Better Auth to quickly bootstrap secure authentication in TypeScript apps, supporting both email/password and OAuth flows along with plugin integration across frameworks.

How do I manage sessions and plugins when setting up Better Auth?

You manage Better Auth sessions and plugins by configuring them within your auth.ts file, enabling streamlined authentication flows and database adapter support before executing the migration CLI.

What is the best way to structure my Better Auth server and client integration?

The best way to structure Better Auth integration is by placing an auth.ts file at the correct project location to configure the server and client, ensuring proper framework routing and environment variable setup.

Why do I need to run a migration CLI when setting up Better Auth?

You need to run the Better Auth migration CLI to satisfy runtime integration requirements, creating the necessary database schema for your configured adapters and session storage strategies.