Use the composable 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 composable useChangePassword.

const { resetPassword, isLoading, isSent, isError, error } = useResetPassword({
  redirectTo: 'http://localhost:3000/settings/change-password'
})

watchEffect(() => {
  console.log(isLoading.value, isSent.value, isError.value, error.value)
})

const handleFormSubmit = async (e) => {
  e.preventDefault()

  await resetPassword('joe@example.com')
}

Parameters


options optional NestedRefOfValue<undefined | ResetPasswordOptions>