Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

$authWithOAuthPopup() doesn't work on mobile

The following does not open a popup/new tab/do anything on Chrome 39.0.2171.50 for iOS 8.1.2 (12B440), however it does seem to work on Safari on the same device:

<button ng-click="$auth.$authWithOAuthPopup('facebook')">Login with Facebook</button>

See plnkr: http://plnkr.co/edit/Ejd7fsyTHf6Ohn0F25Wy?p=preview

Is this a bug with Chrome or Firebase/AngularFire or am I doing something incorrectly?

I see from here that this may be a Chrome issue, however I can't get $authWithOAuthRedirect() to work either; see: http://plnkr.co/edit/9dd0W8X5k33LFBcCLmzs?p=preview

Both Popup and Redirect work on Desktop Chrome 39.0.2171.95

like image 854
Murray Rowan Avatar asked Jan 09 '15 22:01

Murray Rowan


2 Answers

Firebase does not support popups are all platforms. In the event that an unsupported platform is detected, the authWithOAuthPopup() method will return an error with the code TRANSPORT_UNAVAILABLE, indicating that you should try to authenticate with a different transport, such as a browser redirect.

like image 136
Rob DiMarco Avatar answered Oct 13 '22 21:10

Rob DiMarco


Iam not sure of ios but if you use android device along with ionic and firebase, run the following command to fix the issue:

ionic plugin add cordova-plugin-inappbrowser
like image 35
user1188867 Avatar answered Oct 13 '22 20:10

user1188867