better-auth

Configure authentication and authorization for TypeScript applications with plugins and session management.

Updated Dec 16, 2025
One-click install
npx skills add https://github.com/nguyenvanlinh1902/trackingSolar --skill better-auth-nguyenvanlinh1902
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth
Source: https://github.com/nguyenvanlinh1902/trackingSolar/tree/main/.opencode/skill/better-auth
Command: npx skills add https://github.com/nguyenvanlinh1902/trackingSolar --skill better-auth-nguyenvanlinh1902

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Better Auth provides a ready-to-use, framework-agnostic authentication/authorization solution for TypeScript apps, enabling secure user management with built-in features like email/password, OAuth providers, 2FA/MFA, passkeys/WebAuthn, session handling, and RBAC.

Core Features & Use Cases

  • Built-in email/password authentication with optional verification and password policies
  • Social OAuth providers (GitHub, Google, Discord) with token management
  • Advanced features: 2FA/MFA, passkeys, magic links, organizations, and session management
  • Framework-agnostic client/server integration via plugins and adapters for multiple data stores

Quick Start

Install Better Auth in a TypeScript project and initialize the server and client configuration following the guide.

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 web app with OAuth and 2FA?

Configuring TypeScript authentication with OAuth and 2FA involves initializing server and client instances with plugin-based extensions, environment-driven configuration, and provider credential handling for secure user management.

What is the best way to manage user sessions and passkeys in TypeScript?

Managing user sessions and passkeys in TypeScript requires an auth system with built-in WebAuthn support, advanced session handling, and multi-tenant organization capabilities via plugin-based extensions.

Does this TypeScript authentication framework support multi-tenant organizations?

This TypeScript authentication framework fully supports multi-tenant organizations through built-in organization features and RBAC, allowing secure user management across multiple data stores via plugin-based adapters.

Can I use WebAuthn and magic links for passwordless login in TypeScript?

Yes, the framework supports WebAuthn passkeys and magic links for passwordless login in TypeScript through its advanced plugin-based extensions, delivering secure server/client integration without requiring passwords.

How do I configure social OAuth providers like GitHub and Google in TypeScript?

You configure social OAuth providers like GitHub and Google in TypeScript by applying environment-driven configuration and provider credential handling, enabling token management and secure framework-agnostic server/client integration.

What are the limitations of building custom auth versus using a TypeScript framework?

Building custom auth lacks built-in 2FA, passkeys, and session management, whereas using a TypeScript auth framework delivers these features out of the box with plugin-based extensions, RBAC, and multi-tenant support.