better-auth

Implement authentication and authorization for TypeScript applications across frameworks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Implement robust authentication and authorization for TypeScript applications.

Core Features & Use Cases

  • Built-in email/password authentication with verification and session management
  • OAuth providers (Google, GitHub, Discord, etc.) with easy integration
  • Two-factor authentication (TOTP) and WebAuthn passkeys
  • Role-based access control (RBAC) and multi-tenant support
  • Database adapters and framework-agnostic server/client setup for flexible deployments

Quick Start

Configure and run Better Auth in your TypeScript app to enable secure login flows with email/password and OAuth.

Frequently Asked Questions about better-auth

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

FAQPage Schema
How do I implement TypeScript authentication across different frameworks?

TypeScript authentication can be implemented across frameworks like Next.js, Nuxt, SvelteKit, and Express using a framework-agnostic server and client setup. This approach configures email/password, OAuth, and sessions to power secure apps universally.

How does two-factor authentication and WebAuthn passkeys work in OAuth and email/password flows?

Two-factor authentication and WebAuthn passkeys work by layering TOTP verification and passkey challenges on top of standard email/password and OAuth login flows. This mechanism secures user sessions through environment-driven configuration and plugin-based feature selection.

Can I use role-based access control and multi-tenant support for my TypeScript application?

Yes, you can use role-based access control (RBAC) and multi-tenant support for TypeScript applications. These features manage authorization permissions across different user roles and tenant boundaries within your secure app's session management.

Does this authentication approach support database adapters and framework-agnostic deployments?

Yes, this authentication approach supports database adapters and framework-agnostic deployments. It generates adapters and applies plugin-based feature selection to meet environment-driven configuration requirements across various TypeScript runtimes.

What is the best way to add OAuth providers like Google and GitHub to a SvelteKit or Express app?

The best way to add OAuth providers like Google and GitHub to SvelteKit or Express is through easy integration via plugin-based selection. This configures OAuth providers directly within your framework-agnostic TypeScript server setup.

Why set up environment-driven configuration and plugin-based feature selection for app authorization?

Environment-driven configuration and plugin-based feature selection are set up to apply specific authentication mechanisms like 2FA, RBAC, and WebAuthn dynamically. This ensures your TypeScript application only includes the exact authorization features needed for secure deployments.