generatePasswordResetLink method

Future<String> generatePasswordResetLink(
  1. String email, {
  2. ActionCodeSettings? actionCodeSettings,
})
inherited

Generates the out of band email action link to reset a user's password. The link is generated for the user with the specified email address. The optional ActionCodeSettings object defines whether the link is to be handled by a mobile app or browser and the additional state information to be passed in the deep link, etc.

  • email - The email address of the user whose password is to be reset.
  • actionCodeSettings - The action code settings. If specified, the state/continue URL is set as the "continueUrl" parameter in the password reset link. The default password reset landing page will use this to display a link to go back to the app if it is installed. If the actionCodeSettings is not specified, no URL is appended to the action URL. The state URL provided must belong to a domain that is whitelisted by the developer in the console. Otherwise an error is thrown. Mobile app redirects are only applicable if the developer configures and accepts the Firebase Dynamic Links terms of service. The Android package name and iOS bundle ID are respected only if they are configured in the same Firebase Auth project.

Implementation

/// - [email] - The email address of the user whose password is to be
///   reset.
/// - [actionCodeSettings] - The action
///     code settings. If specified, the state/continue URL is set as the
///     "continueUrl" parameter in the password reset link. The default password
///     reset landing page will use this to display a link to go back to the app
///     if it is installed.
///     If the actionCodeSettings is not specified, no URL is appended to the
///     action URL.
///     The state URL provided must belong to a domain that is whitelisted by the
///     developer in the console. Otherwise an error is thrown.
///     Mobile app redirects are only applicable if the developer configures
///     and accepts the Firebase Dynamic Links terms of service.
///     The Android package name and iOS bundle ID are respected only if they
///     are configured in the same Firebase Auth project.
Future<String> generatePasswordResetLink(
  String email, {
  ActionCodeSettings? actionCodeSettings,
}) {
  return _authRequestHandler.getEmailActionLink(
    'PASSWORD_RESET',
    email,
    actionCodeSettings,
  );
}