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