如何管理狀況時火力認證返回空語句期間創建成功的用戶註冊到執行語句..火力地堡認證返回null的語句
firebase.auth().createUserWithEmailAndPassword(email, pass).catch(function(error) {
var errorCode = error.code;
var errorMessage = error.message;
if(errorCode == "auth/email-already-in-use"){ //condition working
alert(errorMessage);
}
else if(errorCode == null){ //this condition not working
alert("Registration Successfully");
}
else{ //condition working
alert("Weak Password");
}
});
你是什麼意思return null語句?你必須添加.then(function(user){// success})。catch(function(error){});如果你想抓住用戶創造的成功。 – bojeil