通过关注this link的信息,我正在尝试使用Firebase创建用户,如下面的代码所示。但是,应用程序运行时似乎没有用户被创建。任何输入是不胜感激。 Firebase网址取自我的测试数据库。添加Firebase用户时出错Swift
let ref = Firebase(url: "https://test-96df2.firebaseio.com")
ref.createUser("[email protected]", password: "correcthorsebatterystaple",
withValueCompletionBlock: { error, result in
if error != nil {
// There was an error creating the account
print("error creating account")
} else {
let uid = result["uid"] as? String
print("Successfully created user account with uid: \(uid)")
}
})
编辑:
的传播错误是:
错误代码:AUTHENTICATION_DISABLED)在 创建的项目console.firebase.google.com必须使用新的火力地堡认证 的SDK可从firebase.google.com/docs/auth/获得。
但是,如下所示,Firebase控制台中启用了电子邮件/密码身份验证。
调试它并查看'error'对象。它应该有更多关于错误的细节。 – adolfosrs
你正在使用什么'firebase'版本? – adolfosrs
我不完全确定我正在使用哪个版本的Firebase,但我相信最新的一个。 – sBourne