Skip to content

Commit

Permalink
Changes for updated OAuth2 gem
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryluk committed Aug 10, 2011
1 parent b48938e commit cec78fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions oa-oauth/lib/omniauth/strategies/google_oauth2.rb
Expand Up @@ -12,8 +12,8 @@ class GoogleOAuth2 < OAuth2
def initialize(app, client_id = nil, client_secret = nil, options = {}, &block)
client_options = {
:site => 'https://accounts.google.com',
:authorize_path => '/o/oauth2/auth',
:access_token_path => '/o/oauth2/token'
:authorize_url => '/o/oauth2/auth',
:token_url => '/o/oauth2/token'
}

super(app, :google_oauth2, client_id, client_secret, client_options, options, &block)
Expand Down Expand Up @@ -55,8 +55,8 @@ def user_data
# however. It will fail in the extremely rare case of a user who has
# a Google Account but has never even signed up for Gmail. This has
# not been seen in the field.
@data ||= MultiJson.decode(
@access_token.get("https://www.google.com/m8/feeds/contacts/default/full?max-results=1&alt=json"))
@data ||=
@access_token.get("https://www.google.com/m8/feeds/contacts/default/full?max-results=1&alt=json").parsed
end

end
Expand Down

0 comments on commit cec78fe

Please sign in to comment.