email-and-password-best-practices

Configure secure email and password authentication with Better Auth.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides developers to implement secure email and password authentication using Better Auth, addressing common misconfigurations and security gaps.

Core Features & Use Cases

  • Guidance on configuring email verification, password policies, reset flows, and token handling
  • Security-focused practices for preventing timing attacks, dummy requests, and data leakage
  • Practical scenarios for building robust auth in web and mobile applications

Quick Start

Configure and enforce secure email/password authentication in your application using Better Auth, covering email verification, password rules, reset flows, and session revocation.

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?

To configure email verification and password reset flows in Better Auth, set up sendVerificationEmail, resetPassword, and token expiration parameters. This guides developers to enforce secure redirect validation and revoke sessions upon password resets.

What are the best practices for secure email and password authentication in web applications?

Secure email and password authentication practices involve enforcing email verification, applying strict password policies, and preventing timing attacks. Implementing token expiration and session revocation on password reset mitigates common security gaps in web and mobile applications.

How do I prevent timing attacks and data leakage during user authentication?

Prevent timing attacks and data leakage by applying security-focused practices like handling dummy requests properly. Configuring strict token expiration and secure reset flows protects the email verification process from exploitation.

Does Better Auth support requireEmailVerification and session revocation on password reset?

Yes, Better Auth supports requireEmailVerification and revokeSessionsOnPasswordReset configurations. Enforcing these settings ensures only verified users access the application and active sessions are securely invalidated when a password reset occurs.

What's the best way to handle token expiration and redirectTo validation for password resets?

The best way to handle token expiration and redirectTo validation for password resets is to enforce strict time limits and validate redirect targets. This prevents unauthorized access and securely manages tokens during the reset process.

When do I need to revoke sessions on password reset in mobile applications?

You need to revoke sessions on password reset in mobile applications whenever a user updates their credentials. This invalidates existing tokens and active logins, protecting the account if the previous password was compromised.