lib/gplus/client.rb in gplus-2.0.1 vs lib/gplus/client.rb in gplus-2.1.0
- old
+ new
@@ -63,9 +63,11 @@
# @param [String] auth_code The code returned to your redirect_uri after the user authorized your application to access their Google+ data.
# @param [Hash] params Additional parameters for the token endpoint (passed through to OAuth2::Client#get_token)
# @param [Hash] opts Additional access token options (passed through to OAuth2::Client#get_token)
# @return [OAuth2::AccessToken] An OAuth access token. Store access_token[:token], access_token[:refresh_token] and access_token[:expires_at] to get persistent access to the user's data until access_token[:expires_at].
def get_token(auth_code, params = {}, opts = {})
+ defaults = { :redirect_uri => @redirect_uri }
+ params = defaults.merge(params)
@access_token = @oauth_client.auth_code.get_token(auth_code, params, opts)
end
# Authorize a Gplus::Client instance to access the user's private data, after initialization
#