email-and-password-best-practices

Configure secure email and password authentication with Better Auth.

Updated Feb 13, 2026
One-click install
npx skills add https://github.com/vidyesh95/qatoto-backend --skill email-and-password-best-practices-vidyesh95
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: email-and-password-best-practices
Source: https://github.com/vidyesh95/qatoto-backend/tree/main/.agents/skills/email-and-password-best-practices
Command: npx skills add https://github.com/vidyesh95/qatoto-backend --skill email-and-password-best-practices-vidyesh95

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides essential guidance and enforcement rules for implementing secure email and password authentication, ensuring robust user account security.

Core Features & Use Cases

  • Email Verification: Enforces email verification to prevent fake sign-ups and confirm user email access.
  • Password Reset Flows: Guides through secure password reset mechanisms, including timing attack prevention and token security.
  • Password Hashing: Details secure password hashing using scrypt by default, with options for custom algorithms like Argon2id.
  • Use Case: Implementing a new user registration system that requires email verification and offers a secure password reset flow.

Quick Start

Configure email verification by setting emailVerification.sendVerificationEmail to send a verification email to the user.

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 implement secure email verification in Better Auth?

To implement secure email verification in Better Auth, configure the emailVerification.sendVerificationEmail setting to dispatch a verification email to the user. This enforces email access and prevents fake sign-ups.

What is the best way to prevent timing attacks during a password reset?

To prevent timing attacks during a password reset, implement specific security considerations for the reset flow, including token security measures and immediate session revocation upon a successful password reset.

Does Better Auth support Argon2id for password hashing?

Yes, Better Auth supports Argon2id for password hashing. It uses scrypt as the default hashing algorithm but provides configuration options to implement custom algorithms like Argon2id for enhanced security.

How do I handle callback URL security for email verification?

Handling callback URL security involves addressing callback URL validation during the email verification configuration to ensure secure redirection and token handling after the user completes the verification process.

Should I revoke existing sessions when a user resets their password?

Yes, you should revoke existing sessions when a user resets their password. Session revocation on password reset is a critical security consideration enforced within the password reset flow to protect user accounts.

Do I need client-side validation for email and password authentication?

Yes, client-side validation is needed for email and password authentication. The implementation addresses client-side validation alongside server-side security rules to ensure robust user account security and prevent invalid inputs.