better-auth

Provide framework-agnostic authentication and authorization for TypeScript applications.

4|Updated Nov 16, 2025
One-click install
npx skills add https://github.com/akornmeier/claude-config --skill better-auth-akornmeier
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth
Source: https://github.com/akornmeier/claude-config/tree/main/skills/better-auth
Command: npx skills add https://github.com/akornmeier/claude-config --skill better-auth-akornmeier

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Better Auth provides a framework-agnostic authentication and authorization layer for TypeScript applications, simplifying secure login flows and user management across projects.

Core Features & Use Cases

  • Framework-agnostic: works with Next.js, Nuxt, SvelteKit, Remix, Express, Hono, etc.
  • Built-in authentication methods: email/password, OAuth, 2FA, passkeys, magic links, and multi-tenant session management.
  • Plugin ecosystem: extend server and client functionality with plugins like two-factor, organization, username, etc.
  • Database & ORM flexibility: supports SQLite, PostgreSQL, MySQL, MongoDB; adapters for Drizzle, Prisma, Kysely.
  • Client-server samples and deployment guidance across common frameworks.

Quick Start

Install better-auth, generate schema with the CLI, and bootstrap a minimal server/client configuration as shown in the docs.

Frequently Asked Questions about better-auth

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

FAQPage Schema
How do I add authentication to a TypeScript app without being locked into a specific framework?

Framework-agnostic authentication for TypeScript apps allows you to implement secure login flows without framework lock-in. Better Auth provides this by offering server and client integrations that work across Next.js, Nuxt, SvelteKit, Remix, Express, and Hono.

Does TypeScript authentication support OAuth, passkeys, and 2FA simultaneously?

Yes, TypeScript authentication supports OAuth, passkeys, and 2FA simultaneously. Better Auth includes built-in authentication methods covering email/password, OAuth, two-factor authentication, passkeys, magic links, and multi-tenant session management out of the box.

Can I use Prisma or Drizzle ORM for session management in a TypeScript auth layer?

Yes, you can use Prisma or Drizzle ORM for session management. Better Auth requires a database adapter and supports ORMs including Drizzle, Prisma, and Kysely across databases like SQLite, PostgreSQL, MySQL, and MongoDB.

How do I set up a framework-agnostic auth server and generate the required database schema?

To set up a framework-agnostic auth server, install the package, use the CLI to generate the database schema, and configure the server and client instances. Better Auth handles route mounting and provides CLI schema generation to bootstrap your configuration quickly.

What is the best way to extend TypeScript authentication with multi-tenant organization features?

The best way to extend TypeScript authentication with multi-tenant features is through a plugin ecosystem. Better Auth supports extending server and client functionality using plugins like organization, two-factor, and username to add multi-tenant session management.