better-auth-best-practices

Configure Better Auth in TypeScript apps with adapters, plugins, and CLI migrations.

1|Updated Sep 11, 2023
One-click install
npx skills add https://github.com/vcntttt/dotfiles --skill better-auth-best-practices-vcntttt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth-best-practices
Source: https://github.com/vcntttt/dotfiles/tree/main/.agents/skills/better-auth-best-practices
Command: npx skills add https://github.com/vcntttt/dotfiles --skill better-auth-best-practices-vcntttt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides best-practice guidance for integrating Better Auth into TypeScript applications, delivering robust authentication with clear configuration, plugin usage, and schema migrations.

Core Features & Use Cases

  • Guided configuration: Set up appName, baseURL, secret, adapters, and plugins to create a secure authentication layer.
  • Migration & schema generation: Utilize the Better Auth CLI to migrate schemas and generate ORM adapters for common databases.
  • Plugin-driven workflows: Extend authentication with two-factor, magic links, OAuth providers, and custom plugins.

Quick Start

Run the Better Auth CLI to initialize and migrate your authentication schema, then integrate the provider into your TypeScript app per the guide.

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

To configure Better Auth in TypeScript, set up appName, baseURL, secret, and database adapters to create a secure authentication layer. This skill enforces environment-driven setup for scalable auth integration across REST or GraphQL backends.

How do I generate and migrate database schemas for Better Auth?

Generate and migrate database schemas for Better Auth by utilizing the Better Auth CLI. Running the migrate and generate commands creates ORM adapters and initializes the required authentication schema for common databases.

Can I use OAuth and two-factor authentication with Better Auth?

Yes, you can use OAuth and two-factor authentication with Better Auth through its plugin-driven workflows. This skill guides extending authentication by integrating magic links, OAuth providers, two-factor plugins, and custom plugins.

What is the best way to manage user sessions with Better Auth?

The best way to manage user sessions with Better Auth is by configuring the built-in session management features within your TypeScript backend. This skill provides best-practice guidance for secure session handling across REST or GraphQL.

Does Better Auth work with both REST and GraphQL backends?

Yes, Better Auth works with both REST and GraphQL backends in TypeScript applications. This skill covers configuration, adapters, and plugin usage to ensure robust authentication integration across either backend architecture.