better-auth

Implement authentication and authorization in TypeScript/JavaScript applications.

1|Updated Oct 31, 2025
One-click install
npx skills add https://github.com/alex-tgk/saasaas --skill better-auth-alex-tgk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: better-auth
Source: https://github.com/alex-tgk/saasaas/tree/main/.claude/skills/better-auth
Command: npx skills add https://github.com/alex-tgk/saasaas --skill better-auth-alex-tgk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building authentication systems is error-prone and time-consuming. Better Auth provides a framework-agnostic, TypeScript-first solution with built-in email/password and OAuth support, plus a plugin ecosystem for advanced features.

Core Features & Use Cases

  • Framework-agnostic auth that works across Next.js, Nuxt, SvelteKit, Remix, Express, and more
  • Built-in email/password and OAuth providers
  • Plugin ecosystem for 2FA, passkeys, magic links, organization support, and more
  • Session management and user management abstractions
  • Flexible database adapters (SQLite, PostgreSQL, MySQL, MongoDB)

Quick Start

Install better-auth, configure environment variables, and bootstrap an auth server and client for your chosen framework.

Frequently Asked Questions about better-auth

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

FAQPage Schema
How do I implement authentication in a TypeScript app without coupling to a specific framework?▼

Framework-agnostic authentication lets you build sign-in, session management, and user handling once and reuse it across Next.js, Nuxt, SvelteKit, Remix, Express, or any TypeScript framework. Better Auth provides email/password and OAuth providers with flexible database adapters and strong type safety.

Can I add OAuth, 2FA, and passkeys to my authentication system?▼

Yes. Better Auth includes built-in OAuth support and a plugin ecosystem that extends authentication with 2FA, passkeys, magic links, and multi-tenant organization features without rebuilding core auth logic.

What databases does TypeScript authentication support?▼

Better Auth works with SQLite, PostgreSQL, MySQL, and MongoDB through flexible database adapters, so you can choose the storage layer that fits your deployment and scale requirements.

Do I need to manage sessions and users separately in my auth system?▼

No. Better Auth provides built-in session management and user management abstractions that handle the complexity of tracking authenticated users and maintaining secure sessions across requests.

Can I use authentication with my existing TypeScript stack?▼

Yes. Better Auth is framework-agnostic and designed to integrate into existing TypeScript/JavaScript applications by exposing reusable API routes and client libraries that work with your current tooling.

What makes TypeScript-first authentication different from generic auth libraries?▼

TypeScript-first auth provides strong type safety throughout your sign-in flows, session handlers, and user data, catching errors at compile time and reducing runtime bugs in security-critical code.