zquestz/omniauth-google-oauth2 — pull request #3 by buggle (2011-11-16 21:46:55+00:00)
Title: Extracting profile data. Respecting options[:redirect_uri].

Hi Josh,

finally here comes the pull request for the change(s) I made.
First I enhanced google_oauth2 to include a call to the profile api endpoint to retrieve all user_data, not just the email address. I also adapted the key to info (instead of user_info) as it's required by new omniauth 1.0

This call to profile api will always take place and always succeeds as it delievers the public profile data, even if the profile scope is not set.

Second i fixed what i consider a bug. At least omniauth and google_oauth2 did not work together very well here. It turned out that the redirect_uri was not taken into account correctly, instead omniauth's callback_url was used. Omniauth set the host of that redirect_uri the wrong in my development environment when it came to the final authentication call to google.

Hope this fix is helpful

Christian