Agent skill · software engineering · samhvw8

better-auth

TypeScript authentication framework (framework-agnostic). Features: email/password, OAuth (Google, GitHub, Discord), 2FA (TOTP, SMS), passkeys/WebAuthn, session management, RBAC, rate limiting, database adapters. Actions: implement, configure, secure authentication systems. Keywords: Better Auth, authentication, authorization, OAuth, email/password, 2FA, MFA, TOTP, passkeys, WebAuthn, session management, RBAC, rate limiting, database adapter, TypeScript auth, social login, Google auth, GitHub auth, Discord auth, email verification, password reset. Use when: implementing TypeScript auth, adding OAuth providers, setting up 2FA/MFA, managing sessions, configuring RBAC, building secure auth systems.

Why this skill is useful

Provides specific TypeScript authentication patterns and commands for implementing secure authentication systems that the AI wouldn't reliably generate on its own.

What it needs

Requires better-auth installed locally. About 3k tokens when loaded. Last updated 2025-12-09. 10 stars on the source repository.

What this skill does

Better Auth Skill Better Auth is comprehensive, framework-agnostic authentication/authorization framework for TypeScript with built-in email/password, social OAuth, and powerful plugin ecosystem for advanced features. When to Use Implementing auth in TypeScript/JavaScript applications Adding email/password or social OAuth authentication Setting up 2FA, passkeys, magic links, advanced auth features Building multi-tenant apps with organization support Managing sessions and user lifecycle Working with any framework (Next.js, Nuxt, SvelteKit, Remix, Astro, Hono, Express, etc.) Quick Start Installation Environment Setup Create .env: Basic Server Setup Create auth.ts (root, lib/, utils/, or under src/app/server/): Database Schema Mount API Handler Next.js App Router: Other frameworks: See references/email-password-auth.md#framework-setup Client Setup Create auth-client.ts: Basic Usage Feature Selection Matrix Feature Plugin Required Use Case Reference --------- ---------------- ---------- ----------- Email/Password No (built-in) Basic auth email-password-auth.md OAuth (GitHub, Google, etc.) No (built-in) Social login oauth-providers.md Email Verification No (built-in) Verify email addresses email-password-auth.md Password Reset No (built-in) Forgot password flow email-password-auth.md Two-Factor Auth (2FA/TOTP) Yes (twoFactor) Enhanced security advanced-features.md Passkeys/WebAuthn Yes (passkey) Passwordless auth advanced-features.md Magic Link Yes (magicLink) Email-based login advanced-features.md Username Auth Yes (username) Username login email-password-auth.md Organizations/Multi-tenant Yes (organization) Team/org features advanced-features.md Rate Limiting No (built-in) Prevent abuse advanced-features.md Session Management No (built-in) User sessions advanced-features.md Auth Method Selection Guide Choose Email/Password when: Building standard web app with traditional auth Need full control over user credentials Targeting users who prefer email-based accounts Choose …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills samhvw8/better-auth

View the source on GitHub

Browse the @skills marketplace