better-auth

Configure environment variables and mount the API handler for TypeScript authentication.

Updated Jan 28, 2026
One-click install
npx skills add https://github.com/brixtonpham/claude-config --skill better-auth-brixtonpham
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth
Source: https://github.com/brixtonpham/claude-config/tree/main/skills/better-auth
Command: npx skills add https://github.com/brixtonpham/claude-config --skill better-auth-brixtonpham

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Better Auth provides a framework-agnostic authentication and authorization solution for TypeScript apps, delivering built-in email/password, social OAuth, multi-tenant capabilities, and a plugin ecosystem to extend security and user management.

Core Features & Use Cases

  • Built-in email/password with optional verification and password reset
  • Social OAuth providers (GitHub, Google, Discord, etc.) with account linking and token management
  • Plugins for advanced features: two-factor authentication, passkeys/WebAuthn, magic links, organizations, rate limiting, and session controls
  • Framework-agnostic integration across Next.js, Nuxt, SvelteKit, Express, and more

Quick Start

Install Better Auth, configure your environment variables (secrets, DATABASE_URL, and provider credentials), and mount the API handler in your framework.

Frequently Asked Questions about better-auth

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

FAQPage Schema
How do I add TypeScript authentication with OAuth and sessions to my app?

TypeScript authentication with OAuth and sessions is enabled by configuring environment variables for secrets and provider credentials, then mounting the framework-agnostic API handler into your app to manage email/password, social OAuth, and session flows.

Does framework-agnostic authentication work with Next.js, Nuxt, SvelteKit, and Express?

Framework-agnostic authentication works with Next.js, Nuxt, SvelteKit, and Express by mounting the API handler directly into your chosen framework, allowing TypeScript apps to manage secure sessions and OAuth across multiple platforms.

Can I implement passkeys and two-factor authentication in TypeScript using plugins?

Passkeys and two-factor authentication can be implemented using a plugin ecosystem that extends TypeScript authentication, adding WebAuthn, magic links, organizations, rate limiting, and advanced session controls to your application.

What is the best way to handle multi-tenant user management and account linking in TypeScript?

Multi-tenant user management and account linking are handled through a framework-agnostic authentication solution offering built-in social OAuth token management, organization plugins, and email/password verification for TypeScript apps.

How do I configure database URLs and provider credentials for secure TypeScript auth?

Database URLs and provider credentials for secure TypeScript auth are configured via environment variables, supplying the necessary secrets, database connections, and OAuth provider settings before mounting the API handler in your framework.

Why do I need environment variables for secrets when setting up email and password authentication?

Environment variables for secrets are required when setting up email and password authentication to securely hash passwords, manage session tokens, and protect sensitive OAuth provider credentials across your TypeScript application infrastructure.