Firebase OAuth不会在手机上重定向 [英] Firebase OAuth won't redirect on phone

查看:186
本文介绍了Firebase OAuth不会在手机上重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一旦我被引导到Facebook,Google或Twitter进行身份验证并提供我的凭据,那么在我被重定向的时候,它所显示的只是一个白屏。我想说的是,它不会将我重新导向到我的应用程序。顺便说一下,当我在Galaxy S5手机上运行我的Ionic应用程序时,会发生这种情况。在我的笔记本电脑上在Chrome上运行它时,重定向工作正常。



这是我的代码。

<$ p $ ($ authData){
$ {
$ timeout(function(){
$ location.path(
$ ref_authWithOAuthPopup) (
},1000);
} else {
$ ionicPopup.alert({
title:'Error',
template:'尝试再次登录。'
});
console.log(error);
}
});


解决方案

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

您可以运行以下命令:

cordova插件添加org.apache.cordova.inappbrowser


Once I get directed to Facebook, Google, or Twitter for authentication and provide my credentials, then at the point I get redirected, all it displays is a white screen. I want to say that it's not redirecting me back to my application.

Btw, this happens when I run my Ionic app on my Galaxy S5 phone. The redirect works fine when I run it on Chrome in my laptop.

This is my code.

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);
            }
    });

解决方案

The solution is to install the following plugin: org.apache.cordova.inappbrowser.

You can run the following command:

cordova plugin add org.apache.cordova.inappbrowser

这篇关于Firebase OAuth不会在手机上重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆