Firebaseをオンラインデータベースとして使用しているSwiftのiOSアプリを実際に開発しています。 そのコンセプトは次のとおりです。ユーザーはfirebase Authentificationの電子メールとパスワードでサインアップしてから、電子メールとパスワードをデータベースに書き込みます。 しかし、今度は、Firebase Auth send password resetを使ってReset mailパスワードを実装したかったのです。 この機能はうまく機能しますが、データベースのパスワードも更新したいと考えています。 私はそれをすることを知らない。ここ は私のコードです:firebaseベースのパスワードを回復する方法Auth firebaseデータベースのパスワードメールをリセットする
@IBOutlet weak var txt_mail: UITextField!
Auth.auth().sendPasswordReset(withEmail: txt_mail.text!) { (error) in
let alertController = UIAlertController(title: "Error", message: error?.localizedDescription, preferredStyle: .alert)
let defaultAction = UIAlertAction(title: "OK", style: .cancel, handler: nil)
alertController.addAction(defaultAction)
self.present(alertController, animated: true, completion: nil)
}
このコードは、私がパスワードを回復する方法を、ユーザーにリセット電子メールを送信し、メールで彼を送っリンクから自分のパスワードを変更するuser'll?