Skill: Better Auth: Two-Factor Auth
by Better Auth
Adds real 2FA to a Better Auth app — TOTP, email/SMS OTP, backup codes, trusted devices — including the sign-in interrupt and the encryption-at-rest details.
Credential auth done to spec in Better Auth: verification email, reset flow, token and session handling, password policy and custom hashing.
Add this skill to your favorite AI agent in a few steps.
Learn how to use this skill with different AI agents.
Email-and-password looks like the easy authentication method and is the one most often shipped insecurely. This official Better Auth skill covers the whole credential path, and spends most of its length on the parts that are easy to get wrong rather than on the two lines that enable the feature.
It starts with the mechanics: turn on emailAndPassword, wire emailVerification.sendVerificationEmail to a real sender, add sendResetPassword, run npx auth@latest migrate, then verify by signing up and confirming the email actually fires. From there it covers requiring verification before sign-in, client-side validation, and how callback URLs should be constructed so a verification or reset link lands somewhere sensible.
The password-reset section is where the detail is. It walks the full flow and then treats security explicitly: token security — single use, short expiry, no leakage through the referrer; session revocation on password change, so a stolen session does not survive the reset that was meant to kill it; and password requirements, with guidance on length and policy rather than arbitrary complexity theatre. A final section covers replacing the default hashing algorithm with your own implementation, which matters when you are migrating users from an existing system and need to verify legacy hashes without forcing a reset.
Written and published by the Better Auth team in their official skills repository, in the portable Agent Skills format that Claude Code, Codex, Cursor and other agents read.
by Better Auth
Adds real 2FA to a Better Auth app — TOTP, email/SMS OTP, backup codes, trusted devices — including the sign-in interrupt and the encryption-at-rest details.
by Better Auth
The reference an agent needs to configure Better Auth correctly: adapters, session strategy, hooks, plugins, type safety and the gotchas that bite in production.
by Better Auth
Turns a single-user app multi-tenant with Better Auth's organization plugin: orgs, members, invitations, teams, roles and dynamic access control.
by Basecamp
Drive a HEY account from an agent through the HEY CLI — Imbox and screener, threads, replies, drafts, contacts, calendar, todos, habits, time tracking and journal entries.