better-auth

Configure Better Auth authentication across Next.js, Express, and SvelteKit stacks.

2|Updated Oct 28, 2022
One-click install
npx skills add https://github.com/jmanuelrosa/dotfiles --skill better-auth-jmanuelrosa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth
Source: https://github.com/jmanuelrosa/dotfiles/tree/main/roles/ai/files/claude/skills/better-auth
Command: npx skills add https://github.com/jmanuelrosa/dotfiles --skill better-auth-jmanuelrosa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Better Auth provides a complete guide to implementing robust authentication, covering server/client configuration, adapters, sessions, and a wide range of plugins to secure apps from bootstrap to production.

Core Features & Use Cases

  • End-to-end configuration for server and client, including adapters, session management, and sensible defaults.
  • Plugin support including two-factor authentication, organization management, passkey, and API tokens.
  • Framework integration guidance with patterns for Next.js, Express, SvelteKit, and similar stacks, plus migration and security considerations.

Quick Start

Install Better Auth in your project, configure core options (database adapter, session storage, and env vars), wire up routes, and run migrations to bootstrap authentication.

Frequently Asked Questions about better-auth

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

FAQPage Schema
How do I set up authentication in Next.js or Express using Better Auth?

To set up authentication with Better Auth, install the package, configure database adapters and session management, wire up server and client routes, and run migrations to apply secure defaults across Next.js or Express stacks.

Can I add two-factor authentication and passwordless login to my authentication setup?

Yes, you can add two-factor authentication, passwordless flows, passkey, and API tokens by extending the core authentication setup with Better Auth plugins, configuring them alongside your existing server and client configuration.

Does Better Auth support SvelteKit and other JavaScript frameworks?

Better Auth supports SvelteKit, Next.js, Express, and similar stacks by providing framework integration guidance for configuring server/client instances, database adapters, and session management.

What's the best way to manage sessions and configure database adapters for authentication?

The best way to manage sessions and database adapters is configuring core options during setup, specifying your database adapter and session storage, and applying sensible defaults provided by the authentication framework.

How do I configure organization management and API tokens for my application?

You configure organization management and API tokens by enabling the respective plugins in your authentication setup, extending the core server and client configuration to handle multi-organization structures and secure token generation.