Google has deprecated their openid provider for Google Apps for Business. Super annoying, because the only option is to move over to their OAuth2 Google+ stuff. Here are the steps to get it going.
First you need to get the requires gems into your Gemfile. In my case I am using devise with Rails 4.2beta so:
We need to get omniauth going so add a route:
Then you need to setup a the callback controller you specified above:
Then we need to add the method
User.find_for_google_oauth2 to our user model:
The last step is to configure devise. First lets add the oauth 2 provider to our devise initializer:
You will notice we specify
select_account - this is required because we need to prompt the user to pick which Google ID they will use if they are signed in with multiple ids.