0

Im using Firebase 4.1.1 javascript with Cordova 7.0.1. My Android and iOS app needs to login using Facebook or Google but the Google login do something strange. After the Google login, it starts another webview so I can see 2 webview of my application in Google Chrome inspect and I dont seems to be logged.

My code:

var provider = new firebase.auth.GoogleAuthProvider();
provider.addScope('profile');
firebase.auth().signInWithRedirect(provider).then(function() {
   firebase.auth().getRedirectResult().then(function(authData) {
   ...
 }); });

I have also followed the instruction here: https://firebase.google.com/docs/auth/web/cordova

My Facebook login works perfectly, does anyone already see this problem with Google login?

Thanks

KENdi
  • 7,576
  • 2
  • 16
  • 31
  • This setting could be the issue: https://developer.android.com/guide/topics/manifest/activity-element.html#lmode. Try setting launchMode to singleInstance. – bojeil Jul 25 '17 at 01:04
  • I dont know how to change that. But why it's working with the Facebook login? I suppose that if it was a setting issue, it will not working on Facebook as well, no? – Sara Laurier Jul 27 '17 at 01:23
  • I have seen developers having similar issues. Changing launchMode seemed to fix it: https://github.com/firebase/firebaseui-web/issues/168 – bojeil Jul 27 '17 at 01:30
  • Great! Thanks!! Is there a way to add something in the config.xml to modify this parameter? Because every time I launch: cordova prepare android, the modification disappear. – Sara Laurier Jul 27 '17 at 02:27
  • Try this: https://stackoverflow.com/questions/21748570/how-should-i-define-launchmode-in-androidmanifest-xml-using-phonegap-jqm – bojeil Jul 27 '17 at 02:59
  • wow, you made my day! Thanks a lot for your help! – Sara Laurier Jul 27 '17 at 03:10

0 Answers0