I am trying to implement social login in my ionic 3 app with the help of 'firebase' authentication. I followed this artical https://javebratt.com/ionic-social-login-firebase/
I installed all the plugins(cordova-plugin-browsertab,cordova-plugin-inappbrowser ..etc) and did exactly same as in the article.
Then I ran the app on both android and ios devices. in android device the facebook/google login page is opened in the 'in app browser' and it is redirected to the app successfully after the login process.everything works fine.
But in the iPhone the facebook/google login pages are opened in a new safari browser instance and after the login it redirect to localhost, and it is not redirected back to the application.
can anyone help me with this?
thank you
I believe the issue is related to ionic in iOS now defaulting to WKWebView (http://ionicframework.com/docs/wkwebview/) which has issues with Firebase. ionic native app URLs in iOS now appear as http://localhost instead of file://assets/.../index.html.
The suggested workaround at this time is to downgrade to UIWebView. Firebase Auth is looking into a solution for this.
I had the same issue, and changing the webview engine didn't solve it for me.
What worked for me was to add
<allow-navigation href="http://*" />
to config.xml.
I guess this worked for me because that localhost:8080/... link works over http, but I only had https://* allowed in my config.xml before that.
Not sure though why this is not an issue on Android, but hope this helps!
I have the same issue. I have followed all the steps described in https://firebase.google.com/docs/auth/web/cordova?authuser=2 but in ios it does not work (in Android all is working fine). I think it is related with the 'customurlscheme' property because this is the property that contains the app name that has to be reopened, but I have checked all the places where I am using it and all seems to be correct (I modified the package name of my app and I think this could be related with the issue).
I will try to fix it, if I find the solution I will let you know.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With