Firebase OAuth不会在手机上重定向

Vic*_*mos 1 oauth firebase firebasesimplelogin

一旦我被引导到Facebook,Google或Twitter进行身份验证并提供我的凭据,那么在我被重定向的时候,所有显示的都是白屏.我想说它不会将我重定向到我的应用程序.

顺便说一下,当我在Galaxy S5手机上运行我的Ionic应用程序时会发生这种情况.当我在笔记本电脑上的Chrome上运行时,重定向工作正常.

这是我的代码.

ref.authWithOAuthPopup(provider, function(error, authData) {
            if(authData){
                $timeout(function(){
                    $location.path('tab/profile');
                }, 1000);
            } else {
                $ionicPopup.alert({
                    title: 'Error',
                    template: 'Try logging in again.'
                });
                console.log(error);
            }
    });
Run Code Online (Sandbox Code Playgroud)

Vic*_*mos 5

解决方案是安装以下插件:org.apache.cordova.inappbrowser.

您可以运行以下命令:

cordova plugin add org.apache.cordova.inappbrowser