better-auth-best-practices

Standardize Better Auth setup for TypeScript projects with structured workflows.

4.6k|378|Updated Jun 28, 2024
One-click install
npx skills add https://github.com/latitude-dev/latitude-llm --skill better-auth-best-practices-latitude-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth-best-practices
Source: https://github.com/latitude-dev/latitude-llm/tree/main/.agents/skills/better-auth-best-practices
Command: npx skills add https://github.com/latitude-dev/latitude-llm --skill better-auth-best-practices-latitude-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Standardize and accelerate authentication integration for TypeScript projects by providing comprehensive guidance for configuring Better Auth servers and clients, setting up adapters, managing sessions, and handling environment variables.

Core Features & Use Cases

  • Setup workflows for integrating Better Auth across server and client codebases, including Prisma/Drizzle adapters and multiple storage options.
  • Guidance on configuring authentication methods (email/password, OAuth providers), session management strategies, and plugin ecosystems.
  • Use cases include securing a new app, migrating from custom auth, and extending authentication with plugins and hooks.

Quick Start

Configure environment variables, implement an auth.ts with adapters, and run the migration CLI to bootstrap Better Auth in your project.

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 set up Better Auth with OAuth and Prisma in a TypeScript project?

To set up Better Auth, you configure environment variables, implement an auth.ts file with Prisma adapters for OAuth and email/password, and run the migration CLI to bootstrap the server and client integration.

What is the best way to manage sessions and environment variables in Better Auth?

The best way to manage sessions and environment variables in Better Auth is by following a structured setup workflow that enforces robust security configurations and standardized database migrations.

Can I use Better Auth plugins to extend authentication with custom hooks?

Yes, you can extend authentication by orchestrating Better Auth plugins and hooks, allowing you to customize the email/password, OAuth, and session management workflows for your TypeScript application.

Does Better Auth work with Drizzle adapters and multiple storage options?

Better Auth works with Drizzle adapters and multiple storage options, providing comprehensive guidance for integrating server and client codebases across various database environments.

What are the limitations when migrating custom authentication to Better Auth?

Migrating custom authentication to Better Auth requires strict adherence to environment variable configurations and database migration steps, though specific limitations depend heavily on your existing session management strategies.