email-and-password-best-practices

Configure Better Auth email verification, password reset flows, and password policies.

2|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/involvex/happy-vibecode --skill email-and-password-best-practices-involvex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: email-and-password-best-practices
Source: https://github.com/involvex/happy-vibecode/tree/main/.agents/skills/email-and-password-best-practices
Command: npx skills add https://github.com/involvex/happy-vibecode --skill email-and-password-best-practices-involvex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams implement secure email and password authentication with Better Auth by guiding configuration of email verification, password reset flows, password policy enforcement, and customizable hashing so users can sign up, sign in, and recover accounts safely.

Core Features & Use Cases

  • Email verification: Configure sendVerificationEmail to send verification links and optionally require verification before allowing sign-in.
  • Password reset flows: Implement sendResetPassword, requestPasswordReset, token expiry policies, and optional session revocation on reset.
  • Password hashing & migration: Use the default scrypt or plug in Argon2id by providing hash and verify functions, and plan migrations for existing hashed passwords.
  • Security & serverless support: Background task handling to safely send emails on serverless platforms, constant-time responses to prevent user enumeration, and configurable token lifetimes.

Quick Start

Enable emailAndPassword, add sendVerificationEmail and sendResetPassword handlers, run npx @better-auth/cli migrate, and verify sign-up and password reset flows.

Frequently Asked Questions about email-and-password-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure email verification and password reset flows in Better Auth?

Configure Better Auth email verification and password reset by enabling emailAndPassword, adding sendVerificationEmail and sendResetPassword handlers, and running npx @better-auth/cli migrate to apply the required schema changes.

Can I use Argon2id instead of the default scrypt for password hashing?

Yes, you can use Argon2id for password hashing instead of the default scrypt by providing custom hash and verify functions, allowing you to plan migrations for existing hashed passwords.

How do I prevent user enumeration during password reset requests?

Prevent user enumeration during password reset requests by implementing constant-time responses, configurable token lifetimes, and optional session revocation on reset to ensure uniform account security enforcement.

Does Better Auth email/password authentication work on serverless platforms?

Better Auth email/password authentication works on serverless platforms using background task handling to safely send verification and reset emails without blocking function execution.

What's the best way to enforce robust password policies for web and mobile apps?

Enforce robust password policies for web and mobile apps using Better Auth by configuring email verification, password reset flows, and customizable hashing to ensure users sign up and recover accounts safely.