Firebase Authentication on Android

I’m trying to authenticate a user using Firebase Auth. When using ionic serve --ssl everything works as you would expect.

However, when using ionic cordova run android -l --ssl and attempting to login the phone switches to the browser and opens a new tab. Selecting the account you would like to use (Google Auth) closes the tab. And that’s where it ends. Closing the browser and switching back to the app reveals the login page without any authentication occurring.

Here’s a video of it in action. IMGUR

I’ve tried the following guides:

  1. https://firebase.google.com/docs/auth/web/google-signin
  2. https://firebase.google.com/docs/auth/web/cordova

And the following libs:

  1. https://github.com/RaphaelJenni/FirebaseUI-Angular
  2. https://github.com/chemerisuk/cordova-plugin-firebase-authentication
  3. https://github.com/baumblatt/capacitor-firebase-auth
  4. https://ionicframework.com/docs/native/firebase-authentication (what kind of documentation is this!?)

Any help I can get at this point would be greatly appreciated!

HI. this is exactly what is happening to me now. It’s seems there’s no enough information regarding.
I was pretty convinced that you must use cordova/capacitor native plugin. but I was struggling on how to achieve that on any platform with the same codebase (native ios/android + pwa)

https://firebase.google.com/docs/auth/web/cordova

this doc looks like an answer. :slight_smile:
But I think I’ll have to quit using AngularFireAuth and refact my auth service using plain firebase sdk.

I’ll appreciate if anyone could confirm on this.

@kneeki did you already solved this?
thanks

I think I was right:

I’ll try it tomorrow.
dx