我試圖做一個火力地堡簡單的用戶註冊登錄,但我收到此錯誤:認證火力地堡
Uncaught ReferenceError: FirebaseAuthClient is not defined
這裏是我的代碼:
var authClient = new FirebaseAuthClient(rootRef, function(error, user) {
if (error) {
alert(error);
return;
}
if (user) {
// User is already logged in.
doLogin(user);
} else {
// User is logged out.
showLoginBox();
}
});
function showLoginBox() {
document.getElementById("#registerButton").addEventListener("click", function() {
var email = document.getElementById("#email").val();
var password = document.getElementById("#password").val();
authClient.createUser(email, password, function(error, user) {
if (!error) {
doLogin(user);
} else {
alert(error);
}
});
});
}
您從哪裏得到FirebaseAuthClient?我認爲這個班已經被棄用了2年以上。請參閱http://stackoverflow.com/questions/17487968/firebase-firebaseauthclient-class-being-deprecated –