Setup & Installation
What This Skill Does
Adds two-factor authentication to Better Auth apps via TOTP authenticator apps, email/SMS OTP codes, and backup codes. Handles the full 2FA lifecycle: enabling, verifying during sign-in, trusting devices, and disabling. Backup codes, TOTP secrets, and OTP tokens can each be stored encrypted at rest. Implementing 2FA from scratch means writing your own TOTP logic, OTP delivery, backup code generation, trusted device cookies, and rate limiting — this plugin handles all of it as a single Better Auth configuration block.
When to use it
- Working with twoFactor functionality
- Implementing twoFactor features
- Debugging twoFactor related issues
