-
-
Notifications
You must be signed in to change notification settings - Fork 414
Home
kwerle edited this page Dec 7, 2012
·
13 revisions
OmniAuth Google OAuth2 Strategy Strategy to auth with Google via OAuth2 in OmniAuth.
Get your API key at https://code.google.com/apis/console/
FAQ's
Where is the omniauth path to start the oauth2 handshake?
Answer: auth/google_oauth2
Example genericized hash returned from google:
{"provider"=>"google_oauth2",
"uid"=>"999999999999999999999",
"info"=>
{"name"=>"First Last",
"email"=>"First.Last@company_name.com",
"first_name"=>"First",
"last_name"=>"Last",
"image"=>
"https://lh3.googleusercontent.com/url/photo.jpg"},
"credentials"=>
{"token"=>"hash.of-stuff",
"expires_at"=>1354920555,
"expires"=>true},
"extra"=>
{"raw_info"=>
{"id"=>"999999999999999999999",
"email"=>"First.Last@company_name.com",
"verified_email"=>true,
"name"=>"First Last",
"given_name"=>"First",
"family_name"=>"Last",
"link"=>"https://plus.google.com/999999999999999999999",
"picture"=>
"https://lh3.googleusercontent.com/-some/url/photo.jpg",
"gender"=>"male",
"birthday"=>"0000-06-25",
"locale"=>"en",
"hd"=>"company_name.com"}
}
}