Email & Password Best Practices

Installation
SKILL.md

Email Verification Setup

When enabling email/password authentication, configure emailVerification.sendVerificationEmail to verify user email addresses. This helps prevent fake sign-ups and ensures users have access to the email they registered with.

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}`,
      });
    },
  },
});
Related skills

More from better-auth/skills

Installs
GitHub Stars
190
First Seen