Overview
useSendVerificationEmail returns a function that sends a verification email to the currently authenticated user. The token expires after 5 minutes. Calling it on an already-verified user is a no-op (returns { success: true } without sending).
Usage Example
Parameters
The returned function accepts an optional props object:"code" | "link"
default:"\"code\""
How the token is delivered.
"code"— user receives a token to type into your app"link"— user receives a clickable button that verifies automatically
"hex" | "numeric" | "alpha" | "alphanumeric"
default:"\"hex\""
Character set for the token.
"numeric" is recommended for OTP-style flows; "hex" for maximum entropy.number
default:"6"
Length of the generated token (4–12). Ignored when
tokenFormat is "hex".string
URL to redirect to after link verification. Only used with
mode: "link". Receives ?verified=true or ?verified=false&error=... as query params.Returns
The hook returns an async function. That function resolves to:boolean
true when the request completes without a server error.
