Overview
useVerifyEmail returns a function that submits a verification token to the server. Used with mode: "code" from useSendVerificationEmail. On success, user.isVerified is updated immediately in the local Redux store.
Usage Example
Parameters
The returned function accepts:The verification token entered by the user. Must match the token from the most recent verification email exactly.
Returns
The hook returns an async function. That function resolves to:true when verification succeeded.On success,
user.isVerified is optimistically set to true in the local
Redux store immediately — no need to refetch the user.
