two-factor-authentication-best-practices
OfficialSecure 2FA with proven best practices.
Software Engineering#security#authentication#otp#totp#two-factor-authentication#backup-codes#trusted-devices
Authorbetter-auth
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This guide provides concrete guidance and enforcement rules for implementing secure two-factor authentication (2FA) using Better Auth's twoFactor plugin, reducing the risk of unauthorized access.
Core Features & Use Cases
- Guidance on configuring the twoFactor plugin with a clear issuer and app name.
- Comprehensive coverage of enabling 2FA for users, verifying codes via TOTP, OTP, and backup codes, and managing trusted devices.
- Real-world scenario: securing a production app's authentication flow by layering TOTP-based 2FA, email OTPs, and backup codes, with a reliable verification and recovery process.
Quick Start
Enable the twoFactor plugin in your Better Auth setup and run the migration to create the required 2FA fields.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: two-factor-authentication-best-practices Download link: https://github.com/better-auth/skills/archive/main.zip#two-factor-authentication-best-practices Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.