twoFactor Skill: Implementing TOTP/OTP Two-Factor Authentication in Better Auth

twoFactor is the official Better Auth Agent Skill that explains how to configure the twoFactor plugin and twoFactorClient in an application, covering the complete 2FA lifecycle, including TOTP authenticators, email/SMS OTP, backup codes, the twoFactorRedirect login flow, trusted devices, and encrypted storage. Based on the official SKILL documentation, this article compiles installation commands, migration steps, and typical code examples. It is suitable for developers who need MFA and already use Better Auth, enabling coding assistants to generate configurations according to official practices rather than fragile single-factor approaches.

Read More
create-auth: Scaffolding Authentication for TypeScript/JavaScript Projects with Better Auth

create-auth is an official Agent Skill provided by Better Auth, designed for TypeScript/JavaScript projects. It follows a two-stage process (planning is required, implementation is pending confirmation), automatically scans the framework and database, collects login methods and plugin requirements through structured questions, and then, based on a new-project, existing-integration, or migration path, installs better-auth, configures auth.ts and routes, runs CLI migrations, and generates an authentication UI. It supports extension packages such as OAuth, 2FA, and organizations. The installation command is npx skills add, which points to the official skills repository.

Read More