What problem does it solve? Adding multi-factor authentication to an application involves many moving parts: TOTP authenticator apps, OTP delivery over email or SMS, backup codes, trusted devices, and secure sign-in flows. This Skill provides complete, working patterns for implementing all of these with Better Auth's twoFactor plugin, including the security configuration details that are easy to get wrong. ## Core Features & Use Cases - TOTP Authenticator Setup: Enable 2FA with password verification, generate TOTP URIs for QR codes, and verify codes with configurable digits and periods. - OTP via Email/SMS: Configure OTP delivery with custom send functions, attempt limits, and encrypted or hashed storage of codes. - Backup Codes & Trusted Devices: Generate, regenerate, and verify single-use backup codes, and remember trusted devices for 30 days. - Use Case: A user signs in with email and password, receives a twoFactorRedirect response, gets routed to a /2fa page, and completes sign-in by entering a code from their authenticator app or a backup code. ## Quick Start Add Better Auth two-factor authentication to my app with TOTP authenticator support, email OTP fallback, and backup codes.