Email is central to Better Auth. Every user has an email address regardless of their authentication method. Better Auth provides utilities for email verification, password reset, and related flows out of the box.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/better-auth/better-auth/llms.txt
Use this file to discover all available pages before exploring further.
Email verification
Email verification confirms that a user’s email address is valid and belongs to them, helping prevent spam and abuse.Setup
To enable email verification, provide asendVerificationEmail function in your auth config:
auth.ts
user— the user object (includesemail).url— the verification URL the user must visit.token— the raw verification token, useful for building custom verification URLs.request— the original request object.
Triggering verification
During sign-up
Set For social logins, the verification status is read from the SSO provider. If the provider does not mark the email as verified, a verification email is sent but is not required to sign in — even when
sendOnSignUp: true to automatically send a verification email when a user registers:auth.ts
requireEmailVerification is enabled.Require verification before sign-in
Set Handle the unverified state on the client:
requireEmailVerification: true to block sign-in until the email is verified. Every sign-in attempt triggers sendVerificationEmail when the email is unverified.auth.ts
auth-client.ts
Verifying the email
When the user clicks the verification URL, their email is automatically verified and they are redirected tocallbackURL.
For a custom verification page, pass the token from the URL to verifyEmail:
Auto sign-in after verification
Sign in the user automatically once they verify their email:auth.ts
Post-verification callback
Run custom logic after a user verifies their email usingafterEmailVerification:
auth.ts
Password reset
Password reset allows users to regain access when they forget their password.Setup
Enable password reset by providing asendResetPassword function in emailAndPassword:
auth.ts
user— the user object.url— the password reset URL.token— the raw reset token for building custom reset URLs.request— the original request object.
See the Email and Password guide for the complete client-side password reset flow.