我正在按照Firebase在官方文檔中指定的電子郵件/密碼註冊設置進行操作;但是,在繼續進行身份驗證時,我仍然收到「發生網絡錯誤」錯誤。使用Firebase註冊電子郵件/密碼時發生「網絡錯誤」錯誤
驗證碼:
window.onload = function() {
const config = {
apiKey: "",
authDomain: "",
databaseURL: "",
storageBucket: "",
messagingSenderId: ""
};
firebase.initializeApp(config);
const btnSignUp = document.getElementById('btnSignUp');
btnSignUp.addEventListener('click', function() {
const inputEmail = document.getElementById('username-input');
const inputPassword = document.getElementById('password-input');
const email = inputEmail.value;
const password = inputPassword.value;
firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) {
console.log(error);
});
});
};
控制檯錯誤:
A network error (such as timeout, interrupted connection or unreachable host) has occurred.
請提供更多關於您正在使用的環境的信息。你還可以檢查你的網絡日誌嗎?請求是否已經發出?這應該有助於解釋事情。 – bojeil