4

With the new google sign 8.3.0 the login works until requesting ".requestServerAuthCode("client id from web application under Oauth 2.0 client ids") .

Looks something like "10381xxxxx183-u8g0o9lig1qli29jxyytrrrewe5lhckfp.apps.googleusercontent.com"

If I ask for this server auth code I get in onActivityResult status 12500. Without it the login works and you get succes.

nvasilescu
  • 141
  • 2
  • 8

3 Answers3

15

I also struggled with the same problem. If I added requestServerAuthCode method, I was not able to sign in.

Make sure you have provided a valid "Web Client Id" (Not Android) in the method requestServerAuthCode

Problem was with SHA configuration. I created a keystore and used it to generate SHA and provided it while generating google-services.json . But while debugging, application was using debug keystore.

Everything worked fine after I configured 'debug' version to use the same keystore. Where is debug.keystore in Android Studio

Hope it helps. :)

Community
  • 1
  • 1
  • 2
    This answer should be accepted... I lost the whole morning and would probably still be banging my head on walls if I had not found this. – jmc34 Feb 08 '16 at 13:30
1

This actually happens if you're asking for permissions which aren't added in OAuth Consent Screen.

https://developers.google.com/identity/protocols/googlescopes?hl=en_US#drivev3

  1. Make sure you check the required scopes given in the link above,add only them, and save it after adding them.
  2. Ask permission for the scopes added,only the added scopes not any other critical permissions which haven't been registered for your app.
  3. You can request sensitive scope permissions based on your apps need but make sure to add required scopes after verification.(If you add a sensitive scope, such as scopes that give you full access to Gmail or Drive, Google will verify your consent screen before it's published.)

Also if this is not the case , then you can check your proguard. Sometimes they tend to work only in debug builds. Proguard rules have to applied for certain google dependencies.

  • I indeed had the 12500 error because the Consent Screen in the Google API Console wasn't setup. After I added all the required fields, it immediately started working. – Peterdk Apr 07 '20 at 17:42
-1

This problem appears when the apk is not signed. You have to generate archive build.json with keystore data and generate apk-release, ionic cordova build android --release. If ionic creates app-release-unsigned.apk it will not work but if ionic creates app-release.apk it means it will work.

amicoderozer
  • 1,875
  • 6
  • 26
  • 40