skills.vishalvoidskills/vishalvoid
Technical & DevelopmentIntermediate

email-and-password-best-practices

Configure email verification, implement password reset flows, set password policies, and customise hashing algorithms for Better Auth email/password authentication.

Developer Setup

Setup & Installation

bash
npx skills add https://github.com/better-auth/skills --skill email-and-password-best-practices

Overview

What This Skill Does

Handles credential-based authentication using email and passwords. Configures secure verification flows, password reset tokens, absolute callback URLs, and client-side validations.

Application

When to use this Skill

Documentation

Show Skills.md file

Better Auth Email and Password

Quick Start

  1. Enable email/password: emailAndPassword: { enabled: true }
  2. Configure emailVerification.sendVerificationEmail
  3. Add sendResetPassword for password reset flows
  4. Run npx @better-auth/cli@latest migrate
  5. Verify: attempt sign-up and confirm verification email triggers

Email Verification Setup

Configure emailVerification.sendVerificationEmail to verify user email addresses.

import { betterAuth } from "better-auth";
import { sendEmail } from "./email"; // your email sending function

export const auth = betterAuth({
  emailVerification: {
    sendVerificationEmail: async ({ user, url, token }, request) => {
      await sendEmail({
        to: user.email,
        subject: "Verify your email address",
        text: `Click the link to verify your email: ${url}`,
      });
    },
  },
});
Lines 1 - 32 of 56

Recommendations

Explore other random skills

All skillsMy patterns