我想在我的Ionic 2+Firebase 3应用程序中使用2+Firebase!它在桌面浏览器上工作得很好,但是当我为android生成APK时,它会在弹出窗口出现之前在auth.js中抛出网络错误。然后,我输入凭据,在该应用程序的空白屏幕出现之后。提前感谢
var provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithPopup(provider).then(function(result) {
// This gives you Access Token. You can use it to access the Google API.
this.navCtrl.push(WriteReviewPage);
// ...
}).catch(function(error) {
alert(error.message);
});}
发布于 2016-11-26 12:16:56
signInWithPopup()还没有在Ionic/Cordova应用程序上工作。
有一个解决办法,你需要安装Google登录插件
其工作方式是使用插件登录用户,然后将这些凭据传递给Firebase。
我为Facebook认证做了一些东西,你会遵循同样的过程,但是用谷歌插件代替。
https://stackoverflow.com/questions/40815202
复制相似问题