zquestz/omniauth-google-oauth2 — Issue #20: Invalid client
Author: afrankel
Created: 2012-03-06 15:45:24+00:00
State: open

Sorry, but I seem to be missing something obvious here. I'm a newbie.

I have the following config (using devise, omniauth):

config.omniauth :google_oauth2, "[my key]", "[secret]", {access_type: 'online', approval_prompt: ''}

[my key] above also happens to equal [my domain]

I get 400 Bad Request:

Error: invalid_client
Request Details
response_type=code
scope=https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
redirect_uri=https://[my domain]/users/auth/google_oauth2/callback
access_type=online
client_id=[my domain]

I think it has to do with one of a few possibilities:
1) I have ssl on my app and I'm wondering if I need to pass additional parms.

2) I am not using the right key/secret. I have found 3 places on google (apps) to set up oauth keys:
a) https://accounts.google.com/ManageDomains - where I have it set up and I'm using this key/secret
b) https://code.google.com/apis/console - where I have it set up but I'm NOT using this key/secret
c) https://www.google.com/a/cpanel/[mydomain]/SetupOAuth - I am NOT using this one.

What am I missing?

Thanks in advance.