Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

INVALID_KEY message trying to authenticate through the Google+ Sign in Button

I am trying to authenticate the user following this gist by Ian Barber. The button asks for the user account, but it never gets to show the authorization dialog and instead exits with the message "An internal error ocurred". Logcat shows this:

W/GLSUser ( 4353): Status from wire: INVALID_KEY status: null
W/GLSUser ( 4353): Status from wire: INVALID_KEY status: null
E/GLSUser ( 4353): Empty consent data
I/GLSUser ( 4353): GLS error: INVALID_KEY [email protected] oauth2:https://www.googleapis.com/auth/plus.login
W/GLSUser ( 4353): Status from wire: Unknown status: UNKNOWN

The certificate used to sign my app is the same configured at my Google API Console page, and the package name is also the same.

like image 482
Nacho Coloma Avatar asked May 24 '13 11:05

Nacho Coloma


1 Answers

This happens when your certificate has been added in the "Simple API Access" section instead of "Client ID for installed applications". In the Google API console of your project click "Create an OAUTH2 client ID" (NOT "Create new Android Key"), select "Android" and introduce your SHA1 and package.

like image 123
Nacho Coloma Avatar answered Oct 16 '22 22:10

Nacho Coloma