googleSignIn not loading in Native

Even when I use your clientId, with com.coronalabs.googleSignIn_demo, I get the same canceled result. There are only 2 things that could be different from when you do the same: my sign in account, and the build SHA1. If you try to log into the app with ideategames@gmail.com, does it work for you?

I am finally able to get a Google login. Not with the simple direct Google login (still returns DEVELOPER_ERROR with Scott’s debug code ), but, as suggested by @vb66r55, with a Firebase login (using the google-services.json).

Thanks to the debug code @Scott_Harrison put in, I was able to find the problem I had before with Firebase login – the support email was blank. Another completely useless and opaque error status from Google: 12500. Among other things, it can mean missing support email, which turned out to be correct. Future users, beware this. Usually it is added when you enable Google authentication, but it wasn’t on some of my older projects.

I rolled it back into my full project, it all works. I am able to get the authCode I need through Firebase login, it is just a bit more complicated.

Thank you for all your time, @Scott_Harrison, I am sorry it was such a problem. (I still think there is an error in your code preventing the direct simple Google login.)

@Scott_Harrison I think there is still a problem. The app works fine, authorization works and I get the step count I need, but the user is never presented with the ‘ALLOW’ screen defined here in the Google Play Console:

All I get is the standard Google Services allow screen. I am guessing that is because I am using the Firebase login? Problem is, Google will reject the app because the Oauth video (a new requirement) has to show that screen.

I tried omitting useGoogleServicesJson but that made no difference.

Not sure what to do. I cannot get googleSignIn without Firebase, but I also must have the ‘ALLOW’ screen. Suggestions? Am I not correctly doing the init, missing a parameter? Does this only work in Native?

I did a fresh rebuild from Native, finally got that working, but the same problem – it asks permission for Google Services, but not for my specific scopes. This won’t pass Google review, I am pretty sure.

I did that (in simulator build, not in Native, I have given up on native for now), now it returns error 4.

Postscript: I finally got it all working (using Simulator build), approved by Google, and released. Here is what I had to do.

  1. Go to my Google Account for the account I was using for testing login, and ‘Revoke Access’ for my app. This resulted in the permission screen showing up.
  2. The review process with Google was horrendous, though they were patient. Final ‘problem’ is specific to Google Fit (and maybe other sensitive services), I had to insert a “Connect to Google Fit” button before sign-in. None of the documentation says this (it says ‘may’ and it does not say must be before Oauth sign-in).
  3. Add the Google counter-sign SHA1 to my Google project and Firebase project (for apps that have app signing managed by Google, which includes all .aab files).

Thank you for your help, Scott.

3 Likes