0
我們正在使用Firebase以及React,通常它可以正常工作。但隨機時間,Firebase數據庫將無法訪問。我們用火力進行認證一樣,所以在這些時候,用戶將無法登錄。Firebase連接錯誤
的錯誤是
A network error (such as timeout, interrupted connection or unreachable host) has occurred.
這裏在
signIn() {
var provider = new firebase.auth.GoogleAuthProvider();
provider.setCustomParameters({
'prompt': 'select_account'
});
firebase.auth().signInWithPopup(provider).then(function(result) {
// This gives you a Google Access Token. You can use it to access the Google API.
var token = result.credential.accessToken;
// The signed-in user info.
var user = result.user;
}.bind(this)).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
console.log(errorMessage);
// The email of the user's account used.
var email = error.email;
// The firebase.auth.AuthCredential type that was used.
var credential = error.credential;
// ...
});
}
簽署有誰知道代碼什麼可能導致這個?
你可以檢查你的瀏覽器網絡控制檯,當發生這種情況,幷包括一個日誌? – bojeil