email-and-password-best-practices

Configure secure email and password authentication with Better Auth.

5|1|Updated Mar 27, 2024
One-click install
npx skills add https://github.com/viclafouch/petit-meme --skill email-and-password-best-practices-viclafouch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: email-and-password-best-practices
Source: https://github.com/viclafouch/petit-meme/tree/main/.agents/skills/email-and-password-best-practices
Command: npx skills add https://github.com/viclafouch/petit-meme --skill email-and-password-best-practices-viclafouch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides comprehensive guidance and enforcement rules for implementing secure email and password authentication, ensuring user data protection and a robust authentication system.

Core Features & Use Cases

  • Email Verification: Enforces email verification to prevent fake sign-ups and ensure user email validity.
  • Password Reset Flows: Guides through setting up secure password reset mechanisms with timing attack prevention and token security.
  • Password Hashing: Details secure password hashing using scrypt by default and offers custom algorithm options like Argon2id.
  • Use Case: Implementing a new user registration system where email verification is mandatory and password resets are handled securely and efficiently.

Quick Start

Configure email verification by setting emailVerification.sendVerificationEmail to your email sending function.

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 and password authentication with Better Auth?

To implement secure email and password authentication with Better Auth, you must configure email verification, secure callback URLs, and select password hashing algorithms like scrypt or Argon2id. Setup involves assigning your email sending function to emailVerification.sendVerificationEmail.

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

Preventing timing attacks in a password reset flow requires implementing robust token security and consistent response timing. This skill provides configuration examples for secure password reset mechanisms that explicitly protect against timing attack vulnerabilities.

How does email verification work to prevent fake sign-ups?

Email verification prevents fake sign-ups by enforcing mandatory email validity before granting user access. You configure this by setting the emailVerification.sendVerificationEmail property to your custom email sending function, ensuring only users with valid emails can register.

Can I use Argon2id instead of scrypt for password hashing?

Yes, you can use Argon2id instead of scrypt for password hashing. While scrypt is the default hashing algorithm provided, this skill offers custom algorithm options that allow you to configure Argon2id for your specific security requirements.

Does Better Auth support mandatory email verification for new user registration?

Yes, Better Auth supports mandatory email verification for new user registration. This skill guides you through enforcing email verification to ensure user email validity and securely manage the registration system.