Flutter: resetPasswordForEmail

Sends a reset request to an email address.

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. Prompt the user for a new password and call auth.updateUser():

await supabase.auth.resetPasswordForEmail(
  'sample@email.com',
  redirectTo: kIsWeb ? null : 'io.supabase.flutter://reset-callback/',
);

Examples

Reset password for Flutter

redirectTo is used to open the app via deeplink when user opens the password reset email.

await supabase.auth.resetPasswordForEmail(
  'sample@email.com',
  redirectTo: kIsWeb ? null : 'io.supabase.flutter://reset-callback/',
);