首页 > 解决方案 > 如何重置统一的firebase身份验证帐户密码

问题描述

我有问题。我正在开发一个统一项目,在这里我使用了firebase 数据库系统。我想添加一个重置密码系统,但没有找到如何处理统一的文档。如果有人知道这个系统,请告诉我。我会很高兴你。

标签: c#unity3dfirebase-authentication

解决方案


有关为 Unity发送密码重置电子邮件的文档包含以下代码片段:

string emailAddress = "user@example.com";
if (user != null) {
  auth.SendPasswordResetEmailAsync(emailAddress).ContinueWith(task => {
    if (task.IsCanceled) {
      Debug.LogError("SendPasswordResetEmailAsync was canceled.");
      return;
    }
    if (task.IsFaulted) {
      Debug.LogError("SendPasswordResetEmailAsync encountered an error: " + task.Exception);
      return;
    }

    Debug.Log("Password reset email sent successfully.");
  });
}

推荐阅读