使用Firebase注册电子邮件/密码时发生“网络错误”错误
问题描述:
我正在按照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