4

Google signin is always returning signed-out. It always fails when pushing the app on the device using Android studio.

However, when I install the signed app it works.

How can I make google sign in works while we are still developing the app?

redochka
  • 12,345
  • 14
  • 66
  • 79

1 Answers1

13

At development time, you are probably using your debug key store:

Get the SHA-1 of your debug key cert:

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

And register it together your package name in developer console Credentials page as well. (Each pair requires one registration)

You can refer to this post's answer for details: Occured an INTERNAL_ERROR when requestEmail from GoogleSignInOptions Android

Or see below blogpost to understand more about OAuth clients registration:

http://android-developers.blogspot.com/2016/03/registering-oauth-clients-for-google.html

Community
  • 1
  • 1
Isabella Chen
  • 2,421
  • 13
  • 25
  • 1
    Thank god! You saved my day! My mistake was to only sign the production key. You also have to add your debug.keystore sha-1. Seems to be a common mistake by developers – Daveloper Apr 24 '17 at 16:06