email-and-password-best-practices

Configure Better Auth email and password authentication with secure defaults and migration guidance.

9|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/PhantomKnight287/saturn --skill email-and-password-best-practices-phantomknight287
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: email-and-password-best-practices
Source: https://github.com/PhantomKnight287/saturn/tree/main/.agents/skills/email-and-password-best-practices
Command: npx skills add https://github.com/PhantomKnight287/saturn --skill email-and-password-best-practices-phantomknight287

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps you configure secure email verification, implement password reset flows, set robust password policies, and customize hashing for Better Auth's email/password authentication. Use it to ensure new users verify their emails, reset forgotten passwords securely, and enforce strong password rules across your app.

Core Features & Use Cases

  • Email verification workflows: ensure users own their email before sign-in and extend to account recovery.
  • Password reset workflows: provide safe, token-based resets with configurable expiration and revocation strategies.
  • Password hashing & policy: support default scrypt or custom hash/verify functions, with min/max length and migration considerations.
  • Use Case: integrate these patterns in a SaaS signup flow to prevent account takeovers and improve security posture.

Quick Start

Enable email/password in your Better Auth config and begin by configuring emailVerification and sendResetPassword to secure user authentication.

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 for Better Auth sign-up flows?

Set up email verification in Better Auth by enabling the emailVerification config option to ensure users own their emails before completing sign-up. This sends a verification link validating account ownership and securing sign-in flows.

What is the best way to implement a secure password reset flow?

Implement a secure password reset flow using token-based resets with configurable expiration. Better Auth's sendResetPassword function generates safe reset links to securely handle forgotten passwords and prevent account takeovers.

Can I use custom hash and verify functions instead of the default scrypt?

Yes, you can use custom hash and verify functions instead of the default scrypt in Better Auth. The password hashing configuration is fully customizable, allowing you to apply your own safe defaults and account migration strategies.

How do I enforce strong password policies for authentication?

Enforce strong password policies by configuring minimum and maximum length constraints in Better Auth's authentication settings. This policy enforcement prevents weak passwords during sign-up and secures user accounts against takeover attempts.

Does Better Auth support migration considerations for existing password hashes?

Yes, Better Auth supports migration considerations for existing password hashes. When configuring email/password authentication, you can implement safe defaults and apply migration strategies to transition users to updated hashing algorithms.