Google oauth2 missing client_id

Skip to first unread message

Rusty Myers

Oct 23, 2014, 10:51:41 PM10/23/14

I'm working on setting up a test of the OpenConferenceWare and I'm having some issues getting Google Oauth2 to work. I'm quite new to ruby on rails, so forgive me for the basic understanding.

I've added the gem "omniauth-google-oauth2" and the following, with my appropriate client ID and secret to config/initializers/02_omniauth.rb :
   provider :google_oauth2, ENV["GOOGLE_CLIENT_ID"], ENV["GOOGLE_CLIENT_SECRET"]

I've made sure I've set up my developer project with the correct APIs and Consent Screen changes, as told to here:

I'm not using a custom view, just the link provided automatically on the login page.

When I attempt to log in via google, I am told I'm "Missing required parameter: client_id". Did I not add it in the right places?


Rusty Myers

Rusty Myers

Oct 24, 2014, 8:05:52 AM10/24/14
OK, so now I know a bit more about ENV variables. I figured out my mistake with Google Oauth2. I was placing the client_id inside the "ENV[myIDhere]" when I should have just replaced the whole ENV with the client_id. My followup question would be, is it the correct thing to do? Should I leave the ENV variables there and set my client_id elsewhere? Where?

Reid Beels

Oct 27, 2014, 9:33:42 PM10/27/14
Hi Rusty,

It looks like you’re using the example code from the OAuth plugin, which uses environment variables. The idea with environment variables is that they’re set in your shell, outside of the app. This keeps sensitive information out of version control and is particularly useful if you’re deploying to someplace like heroku.

For local testing, you can set these environment variables in my shell, before running the app,like so:

export GOOGLE_CLIENT_ID="my_key"
export GOOGLE_CLIENT_SECRET="my_secret"

You can also put these commands in a file and source it in to your shell’s environment with `source secret_file_name`


You received this message because you are subscribed to the Google Groups "openconferenceware" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

Rusty Myers

Nov 12, 2014, 3:05:09 PM11/12/14
Thanks Reid,

I was able to set the variables and pull them in. 
Reply all
Reply to author
0 new messages