Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Better Auth · Module

verifyEmail

verifyEmail completes manual email verification from a token in a custom verification link. Calling it with the token lets Better Auth verify the user's email.

How it works

The client verifies an email by calling verifyEmail with a query object containing the token from the verification URL. After the user follows the link, Better Auth marks the email as verified and can redirect to the configured callback URL; custom post-verification work can run through afterEmailVerification.

Syntax

await authClient.verifyEmail({ query: { token } })

Parameters

NameTypeDescription
query.tokenstringVerification token passed in the query object; the token comes from the verification URL.

Returns

The documentation does not specify the method's response shape.

Key points

  • Following the supplied verification URL can complete verification automatically and redirect the user to callbackURL.
  • Use afterEmailVerification for application-specific work that must run immediately after successful verification.
  • The email sender receives a data object containing the user, including the address that needs verification.

Common mistakes

  • Manual verification requires putting the token into a custom link and then passing it to verifyEmail.
  • Enabling required verification blocks users from signing in until their email is verified.

Example: Verify an email with a token

import { betterAuth } from "better-auth";

export const authClient = createAuthClient();

const result = await authClient.verifyEmail({
  query: {
    token: "verification-token"
  }
});

if (result.error) throw result.error;

Pass the verification token from a custom verification URL to complete email verification.

When to use it

Custom verification page

A custom verification page reads a token from its URL and calls verifyEmail to finish verification.

Link-based verification

An application uses the built-in verification URL so clicking the link verifies the address and redirects the user.

Post-verification workflow

An application needs to perform provisioning or notifications after verification completes.

Interview questions

QWhat does authClient.verifyEmail do?

verifyEmail completes manual email verification. The client receives the token in the query object, and Better Auth uses that token to verify the email.

Follow-up: How can verification happen without calling this method directly? The user can open the generated verification URL, which verifies the email automatically and redirects to the configured callback URL.

QWhat input does the method require?

Call authClient.verifyEmail({ query: { token } }), where token is the verification token contained in the custom verification link.

Follow-up: What should happen after verification? Configure afterEmailVerification to run custom code immediately after the email is verified.

QHow does required verification affect sign-in?

When require email verification is enabled, users must verify their email before logging in. Verification is initiated through the configured email-sending flow, and the verification token completes it.

Follow-up: When is the sender invoked during sign-in? The documentation says sendVerificationEmail is called every time a user tries to sign in when verification is required.

  • sendVerificationEmail
  • afterEmailVerification
  • emailVerification
  • callbackURL
  • requireEmailVerification

Source: Email - Better Auth. Checked 2026-10-15.