useResetPassword()
Use the hook useResetPassword to reset the password for a user. This will send a reset password link in an email to the user. When the user clicks on the reset-password link the user is automatically signed in and can change their password using the hook useChangePassword.
const { resetPassword, isLoading, isSent, isError, error } = useResetPassword()
console.log({ isLoading, isSent, isError, error })
const handleFormSubmit = async (e) => { e.preventDefault()
await resetPassword('joe@example.com', { redirectTo: 'http://localhost:3000/settings/change-password' })}Parameters
Section titled “Parameters”options optional ResetPasswordOptions