【问题标题】:Firebase Reset Password Swift [closed]Firebase 重置密码 Swift [关闭]
【发布时间】:2016-06-18 21:56:43
【问题描述】:

我想知道你们是否可以告诉我如何在 Swift 中设置重置密码,我目前正在使用 Firebase 作为我的后端服务。我只需要代码。

【问题讨论】:

标签: ios swift passwords firebase reset


【解决方案1】:

答案在API documentation

-sendPasswordResetWithEmail:completion:

为给定的电子邮件地址启动密码重置。

请参阅FIRAuthErrors 了解所有 API 方法共有的错误代码列表。

在 Swift 3.x 和 Firebase 3.x 中,它看起来像这样:

FIRAuth.auth()?.sendPasswordReset(withEmail: "email@email") { error in
    // Your code here
}

编辑:

Firebase 4 更改了 Firebase 函数,使其更符合 Swift 中的命名约定。

Auth.auth().sendPasswordReset(withEmail: "email@email") { error in
    // Your code here
}

【讨论】:

  • 如果我的回答正确,请采纳! :-)
  • 感谢@Jay +1
  • 亲爱的@Jay,您的 +1。明智地使用它
  • @Jay 像你这样的人让互联网成为一个更好的地方......并且谷歌搜索更容易!我很感激! +1
  • 密码重置邮件发送后你会怎么做?电子邮件中的链接是否会将用户带回应用程序?
猜你喜欢
  • 2018-07-15
  • 2016-10-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-10-13
  • 2013-01-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多