We\'re under Android (Jellybean and higher), and we\'ve got an app which need to use OAuth2 with Google for authentication.
I simplified the login activity, but it\'
For me, the problem was Signing-certificate fingerprint (SHA-1) of the debug app and the release app does not match when I upgrade app and change package name. I've wasted days checking package name then figure out the problem is the package name.
To get correct SHA-1 key, follow this S.O post, then use this key to create a new OAuth client ID for your app.