better-auth

Configure authentication and authorization for TypeScript applications across frameworks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

TypeScript applications often struggle to implement secure authentication and fine-grained authorization; this Skill provides a complete, plug-in capable framework to streamline user sign-in, access control, and session management.

Core Features & Use Cases

  • Built-in email/password with verification, session management, and password resets.
  • OAuth providers (GitHub, Google, Discord, etc.) for quick sign-in.
  • Advanced features: 2FA/MFA, passkeys/WebAuthn, magic links, multi-tenant organizations, RBAC, and rate limiting.
  • Framework-agnostic integration across Next.js, Nuxt, SvelteKit, Astro, Hono, Express, and more.
  • Use case: rapidly secure a new app with scalable auth and customizable roles.

Quick Start

Install better-auth, configure the server, and mount the API handler in your framework to enable production-ready authentication.

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 application?

To add authentication to a TypeScript application, you can use a framework-agnostic library that provides built-in email/password, social OAuth, and session management features. This approach streamlines secure user sign-in across various TS frameworks.

Does TypeScript authentication work with Next.js and SvelteKit?

Yes, TypeScript authentication frameworks can work with Next.js and SvelteKit. Framework-agnostic integration allows you to mount API handlers across multiple platforms including Nuxt, Astro, Hono, and Express to enable production-ready login.

How do I set up multi-tenant RBAC and 2FA in TypeScript?

Setting up multi-tenant RBAC and 2FA in TypeScript requires an advanced authentication framework supporting role-based access control and multi-factor authentication. You configure plugins to enable organization management, passkeys, and magic links securely.

What is the best way to implement OAuth providers in a TypeScript app?

The best way to implement OAuth providers in a TypeScript app is using a pluggable authentication framework. It supports built-in integration with social providers like GitHub, Google, and Discord for quick and secure sign-in capabilities.

Can I customize session management and rate limiting for TypeScript login?

Yes, you can customize session management and rate limiting for TypeScript login. A comprehensive authentication framework provides built-in session handling and plugin-capable rate limiting to secure user access and prevent brute-force attacks.