【发布时间】:2016-04-11 02:35:01
【问题描述】:
我在 ionic 上的 firebase facebook 弹出式登录正常工作,但突然停止工作(好吧,我正在修改应用程序,但我没有触及服务)。该过程仍然可以在浏览器上运行(当我使用 ionic serve 时),但不能在 ionic 应用程序上运行。
var auth = $fAuth(ref);
// login with Facebook
auth.$onAuth(function(authData){ // authData -> null
console.log("Auth..", authData); // Auth.. null
/* refresh user data on firebase and registering push */
});
auth.$authWithOAuthPopup("facebook").catch(function(error) {
console.log("Authentication failed:", error);
});
当它工作时,$onAuth cb 函数在 authData 变量中接收一个具有 uid 和 facebook 等属性的对象。
当我跑步时:
ref.authWithOAuthPopup("facebook",function(){console.log(arguments)})
或:
ref.authWithOAuthPopup("twitter",function(){console.log(arguments)})
回调函数永远不会触发。
我在 $ionicPlatform.ready 事件上运行身份验证过程。 我已经卸载并重新安装了应用程序,并清理了应用程序数据。
谢谢!
【问题讨论】:
标签: android popup ionic firebase firebase-authentication