我正在尝试在我的打包的Firefox OS应用中使用firebase google身份验证,但仍然遇到同样的问题。这是我的登录代码。
$scope.googleLogin = () => {
mainRef.authWithOAuthRedirect("google", (error, authData) => {
if (error) {
console.log(error);
new Notification("There was an error logging in, please try again");
}
else {
$scope.users.$add({
username: authData.google.displayName,
uid: authData.auth.uid,
})
localStorage.setItem("user", authData.google.displayName);
localStorage.setItem("localUID", authData.auth.uid);
localStorage.setItem("avatar", authData.google.profileImageURL);
$state.go("app.playlists");
new Notification("Thanks for logging in!");
}
})
}
当此代码在Firefox OS 2.0模拟器中运行时,我在控制台中收到此错误: 在加载页面时,与wss://s-dal5-nss-28.firebaseio.com/.ws?v = 5& ns = firefoxnote的连接被中断。