I have been struggling for two days on this problem and I’ve decided to reach out for help.
I am trying to implement Google Login with firebase and Ionic 3, but I keep getting error “10” on login.
I created and iOS and Android app in Firebase. Then followed this turorial: https://javebratt.com/ionic-google-login/
I searched for where I should get the REVERSED_CLIENT_ID. Strange as it can be, the tutorial is saying it should be the same as the webClientId, but then the official doc for the plugin says something else (https://github.com/EddyVerbruggen/cordova-plugin-googleplus), and finally the official Ionic website says in a tutorial something different (https://docs.ionic.io/services/auth/google-native.html) from the other two. So, I got my REVERSED_CLIENT_ID from the config file downloaded from my iOS Firebase app dashboard.
So, now the webClientId: I got it from the “Web client (auto created by Google Service)” in the “OAuth 2.0 client IDs” section of my Google Developer console credentials that were created automatically by Firebase for my project.
Now the SAH-1 signature from debug.keystore. I didn’t have a debug.keystore in my ~/.android/ folder, so I created one using Android Studio. I got the SHA-1 using key tool and registered it to my Firebase Android app dashboard.
When I deploy to android using
ionic cordova run android -l -c
and click the Google Login button, I get the login prompt. But when I click on the Google account I want to use for sign-in, the prompt closes and the promise is rejected and goes throw the
catch. The error contained in the callback is just
10. No message, nothing, juste
I have searched the web for this issue, but couldn’t find any help or sometimes contradicting solutions:
The only difference with all the tutorials I found is that my created my Google Credentials were automatically setup by Firebase.
Thanks a lot for your help !