$ authWithOAuthPopup () does not work on mobile devices

Below the popup / new tab / nothing opens on Chrome 39.0.2171.50 for iOS 8.1.2 (12B440), however, it seems 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 wrong?

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

Both Popup and Redirect work on Desktop Chrome 39.0.2171.95

+5
source share
2 answers

Firebase does not support pop-ups - these are all platforms. If an unsupported platform is authWithOAuthPopup() method returns an error with the code TRANSPORT_UNAVAILABLE , indicating that you should try to authenticate using another transport, such as browser redirection.

+4
source

I'm not sure about ios, but if you are using an Android device with ionic and firebase, run the following command to fix the problem:

 ionic plugin add cordova-plugin-inappbrowser 
+2
source

Source: https://habr.com/ru/post/1210772/


All Articles