无法启用 email/password 身份验证提供程序
Cannot enable email/password authentication provider
我在 firebase 中启用 email/password 登录方法 menu.The 下面给出了用于创建新用户和登录的代码:
$scope.chatRef = new Firebase("https://project-497516355415797631.firebaseio.com");
$scope.login = function(){
$scope.chatRef.authWithPassword({
email : "debojyoti1@gmail.com",
password : "123456"
}, function(error, authData) {
if (error) {
console.log("Login Failed!", error);
} else {
console.log("Authenticated successfully with payload:", authData);
}
});
}
$scope.createUser = function(){
$scope.chatRef.createUser({
email : "bobtony@firebase.com",
password : "correcthorsebatterystaple"
}, function(error, userData) {
if (error) {
console.log("Error creating user:", error);
} else {
console.log("Successfully created user account with uid:", userData.uid);
}
});
}
仍然是错误 Error: The specified authentication provider is not enabled for this Firebase.
是 showing.What 我做错了什么?感谢您的宝贵时间。
您的项目使用的是旧版 SDK。 "new Firebase("etc...")" 适用于 Firebase Legacy Version 而不是 Firebase 3.0 版本,您应该使用此文档
我在 firebase 中启用 email/password 登录方法 menu.The 下面给出了用于创建新用户和登录的代码:
$scope.chatRef = new Firebase("https://project-497516355415797631.firebaseio.com");
$scope.login = function(){
$scope.chatRef.authWithPassword({
email : "debojyoti1@gmail.com",
password : "123456"
}, function(error, authData) {
if (error) {
console.log("Login Failed!", error);
} else {
console.log("Authenticated successfully with payload:", authData);
}
});
}
$scope.createUser = function(){
$scope.chatRef.createUser({
email : "bobtony@firebase.com",
password : "correcthorsebatterystaple"
}, function(error, userData) {
if (error) {
console.log("Error creating user:", error);
} else {
console.log("Successfully created user account with uid:", userData.uid);
}
});
}
仍然是错误 Error: The specified authentication provider is not enabled for this Firebase.
是 showing.What 我做错了什么?感谢您的宝贵时间。
您的项目使用的是旧版 SDK。 "new Firebase("etc...")" 适用于 Firebase Legacy Version 而不是 Firebase 3.0 版本,您应该使用此文档