Description
This is an agent skill for adding two-factor authentication to a Better Auth app. It supports TOTP authenticator apps, email or SMS one-time codes, and backup codes. The skill covers the full two-factor lifecycle: enabling it for a user, verifying the code during sign-in, trusting a device so the prompt is skipped for 30 days, and disabling it on an account. It also covers generating and showing backup codes when a user sets up two-factor. The page says backup codes, TOTP secrets and one-time tokens can each be stored encrypted at rest. It explains that building this from scratch means writing your own TOTP logic, code delivery, backup code generation, trusted device cookies and rate limiting, while the Better Auth plugin provides all of it as one configuration block. The skill is part of the official Better Auth skills collection on GitHub and is listed on officialskills.sh. Install it with npx skills add https://github.com/better-auth/skills --skill twofactor.…
Highlights
- TOTP authenticator app support
- Email or SMS one-time codes as a second factor
- Backup code generation and display
- Trusted devices that skip the prompt for 30 days
- Encrypted storage for secrets and backup codes
Ratings & Reviews
No ratings yet
Be the first to rate better-auth/twoFactor.
People also visit
better-auth/twoFactor FAQ
What is this skill?
An agent skill that helps a coding assistant add two-factor authentication to a Better Auth app.
Which second factors does it support?
TOTP authenticator apps, email or SMS one-time codes, and backup codes.
How do I install it?
Run npx skills add https://github.com/better-auth/skills --skill twofactor, or paste the GitHub link into your coding assistant and ask it to install the skill.
Can it remember a trusted device?
Yes. The skill covers trusting a device so the two-factor prompt is skipped for 30 days on that device.
What are the best better-auth/twoFactor alternatives?
Popular alternatives to better-auth/twoFactor include two-factor-authentication-best-practices, firstorderai/authenticatormcp and better-auth-security-best-practices. See all better-auth/twoFactor alternatives

.png?auto=compress&fit=max&w=128)






