我有一个Firebase应用程序连接到monaca CLI和OnsenUI。我正在尝试创建一个用户并以相同的操作登录它们。 我可以成功地创建一个用户,但我不能登录。当我登录他们在我收到以下错误使用Firebase登录用户时出现“auth/user-not-found”
auth/user-not-found
和
There is no user record corresponding to this identifier. The User may have been deleted
我证实,新用户是在分贝...这是我的代码注册和登录
//signup function stuff
var login = function() {
console.log('got to login stuff');
var email = document.getElementById('username').value;
var password = document.getElementById('password').value;
//firebases authentication code
firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
console.log('User did not sign up correctly');
console.log(errorCode);
console.console.log(errorMessage);
});
firebase.auth().signInWithEmailAndPassword(email, password).catch(function(error) {
console.log(error.code);
console.log(error.message);
});
fn.load('home.html');
};
创建一个用户自动记录该用户,因此您不需要分开登录它们。 –