Firebase身份验证电子邮件未注册

时间:2020-07-10 22:26:45

标签: swift firebase firebase-authentication

我无法获取电子邮件和密码来注册到我的Firebase数据库中。该代码运行平稳,但是当我从注册用户中退出页面时,该电子邮件不会显示在Firebase数据库中。我的代码在下面。

@IBAction func FinalNext(_ sender: Any) {
    
    if let email = EmailSignUp.text, let password = PasswordSignUp.text {
        
        FirebaseAuth.Auth.auth().createUser(withEmail: email, password: password) { authResult, error in
            if authResult != nil {
                self.performSegue(withIdentifier: "SignUpToFeed", sender: self)
            }
                else {
                    print("There was an error")
                }
            }
        
    
}
}

谢谢!

我已经确保已对其进行配置,并且一切...如果我手动将用户输入到我的Firebase数据库中,它将可以登录用户。我只是无法从我的项目中将电子邮件和密码注册到数据库中。

1 个答案:

答案 0 :(得分:0)

转到firebase控制台,然后在“身份验证”页面中的“登录”方法下,允许电子邮件

enter image description here