Send a password reset request

Sends a password reset request to an email address.

  • When the user clicks the reset link in the email they are redirected back to your application. You can configure the URL that the user is redirected to via the redirectTo param. See redirect URLs and wildcards to add additional redirect URLs to your project.
  • After the user has been redirected successfully, prompt them for a new password and call updateUser():
const { data, error } = await supabase.auth.update({
  password: new_password,

const { data, error } = await supabase.auth.api.resetPasswordForEmail(
  { redirectTo: 'https://example.com/update-password' }