Better Auth/emailAndPassword — Agent Skills | officialskills.sh
Back to skills

emailAndPassword

officialsecurity

Handles email/password authentication for Better Auth, covering sign-up, sign-in, email verification, password reset flows, and password hashing configuration.

Setup & Installation

npx skills add https://github.com/better-auth/skills --skill better-auth-emailAndPassword
or paste the link and ask your coding assistant to install it
https://github.com/better-auth/skills/tree/main/better-auth/emailAndPassword
View on GitHub

What This Skill Does

Handles email/password authentication for Better Auth, covering sign-up, sign-in, email verification, password reset flows, and password hashing configuration. Supports policies like minimum length, token expiry, and session revocation on reset. Hashing defaults to scrypt but can be swapped for Argon2id or any custom algorithm.

Wiring up password reset flows, email verification gates, and hashing policies from scratch involves non-trivial timing-attack mitigations and token lifecycle management that this handles out of the box.

When to use it

  • Setting up email verification that blocks sign-in until the address is confirmed
  • Sending password reset emails with single-use, expiring tokens
  • Revoking all active sessions when a user resets their password
  • Switching from scrypt to Argon2id for password hashing with custom cost parameters
  • Configuring minimum and maximum password length requirements at the server level