Skip to content
GuilhermeSimoes edited this page Feb 25, 2013 · 13 revisions

FAQ's

Where can I get my API key?

Get your API key at https://code.google.com/apis/console/

Where is the omniauth path to start the oauth2 handshake?

auth/google_oauth2

What does a response from google look like during the handshake?

{
    :provider => "google_oauth2",
    :uid => "123456789",
    :info => {
        :name => "John Doe",
        :email => "john@company_name.com",
        :first_name => "John",
        :last_name => "Doe",
        :image => "https://lh3.googleusercontent.com/url/photo.jpg"
    },
    :credentials => {
        :token => "token",
        :refresh_token => "another_token",
        :expires_at => 1354920555,
        :expires => true
    },
    :extra => {
        :raw_info => {
            :id => "123456789",
            :email => "user@domain.example.com",
            :verified_email => true,
            :name => "John Doe",
            :given_name => "John",
            :family_name => "Doe",
            :link => "https://plus.google.com/123456789",
            :picture => "https://lh3.googleusercontent.com/url/photo.jpg",
            :gender => "male",
            :birthday => "0000-06-25",
            :locale => "en",
            :hd => "company_name.com"
        }
    }
}

Tips on the scope parameter

  • You don't need the https://www.googleapis.com/auth/ prefix.
  • You provide a comma separated list, without spaces.
  • You need to give userinfo.email to get the email.
Clone this wiki locally