Fllutter Firebase重置密码没有动态链接

问题描述 投票:0回答:1

在我的应用程序中,我使用此代码将重置电子邮件链接发送到用户电子邮件:

Future<BaseResponse<bool, BaseError>> sendResetPasswordLink(
  String email,
) async {
  try {
    // await _auth.sendPasswordResetLink(email);

    var acs = ActionCodeSettings(
      // URL you want to redirect back to.
      // URL must be whitelisted in the Firebase Console.
      url: 'example',
      // dynamicLinkDomain: 'example',
      // Must be true for app handling
      handleCodeInApp: true,
      androidMinimumVersion: '1',
      androidPackageName: 'com.example.app',
      iOSBundleId: 'com.example.app',
    );

    await FirebaseAuth.instance
        .sendPasswordResetEmail(email: email, actionCodeSettings: acs);

    return BaseResponse.completed(
      true,
    );
  } catch (e) {
    return BaseResponse.error(BaseError(message: 'unknown error'));
  }
}

我不想使用Firebase动态链接将其重定向到我的应用程序。有什么办法可以在没有FDL的情况下进行此重定向?

flutter firebase-authentication
1个回答
0
投票
can

通过A

continue URL
,但这不必指向Firebase动态链接。您可以将您喜欢的任何URL传递,包括您在没有Firebase Dynamic Link的情况下处理的URL。

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.