Firebase OAuth不会在手机上重定向 [英] Firebase OAuth won't redirect on phone
问题描述
这是我的代码。
<$ 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屋!