Skip to main content

Overview

useRequestPasswordReset returns a function that sends a password reset email to the specified address. The server gives the same answer whether or not the address is registered, to prevent user enumeration.

Usage Example

Parameters

The returned function accepts:
string
required
The email address to send the reset link to.

Returns

The hook returns an async function that resolves with nothing (Promise<void>) when the request completes without a server error, whether or not the email address is registered.
The reset link in the email expires after 1 hour. The link points to a server-hosted page that collects the new password and calls the Reset Password endpoint.

See Also