0

I am working on an Android application using a Google SSO. I followed the Google Developer guide and followed all the steps from beginning including the O-Auth and creating the configuration file.

The feature worked correctly, but when a colleague of mine forked the code and added his changes (independent of my module) and compiled Built his code, the

Log.d(TAG, "handleSignInResult:" + result.isSuccess());

in SignInActivity.java's handleSignInResult() gives the value as false. This hinders the app from signing in. We tried cloning my branch separately and building.

We are facing the same problem. The feature works only from the machine from which the registration of the api was done, but the same code doesn't work in any other ones.

What can be possible reasons for the isSuccess() method to return false? Also is there any guide explaining the contents of google-services.json file?

huskygrad
  • 1,257
  • 1
  • 10
  • 21

1 Answers1

1

No :) Your problem is missing OAuth client registration.

OAuth client is uniquely identified by package name + signing cert SHA1 hash. Sounds like you guys are using debug key store, which will be different on your machine and your colleague's machine. You need to register an additional OAuth2 client for your colleague.

Take a look at this post: Android Google SignIn not working in debug mode: GoogleSignInResult is false

Ignore google-services.json. Take a look at "Note" section in the Getting Started guide: https://developers.google.com/identity/sign-in/android/start-integrating#add-config

Community
  • 1
  • 1
Isabella Chen
  • 2,421
  • 13
  • 25