Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70432

Ionic / firebase google login doesn't redirect back

$
0
0

@benasber wrote:

Hi guys, kind of new to using firebase here and I’m running into an issue while developing an Android app.
I’m trying to do google authentication according to this little guide here

so I use the GoogleAuth() function to login:

GoogleAuth() {

    this.AuthLogin(new firebase.auth.GoogleAuthProvider());

  }

  // Auth providers

  AuthLogin(provider) {

    firebase.auth().signInWithRedirect(provider).then(function() {

      return firebase.auth().getRedirectResult();

    })

    .then(function(result) {})

    .catch(function(error) {

      // Handle Errors here.

      var errorCode = error.code;

      var errorMessage = error.message;

    });

  }

And everything goes to plan, except, that when I choose my google account, I get redirected to my app IN THE BROWSER, instead of natively, which messes everything up, as the browser just throws errors and other issues while trying to compile the app.

How do I fire the callback I provided in the function and redirect back to the app, instead of having to continue in the browser?

Thanks a lot!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>