lib/omniauth/strategies/gplus.rb in omniauth-gplus-1.2.0 vs lib/omniauth/strategies/gplus.rb in omniauth-gplus-2.0.0.beta1

- old
+ new

@@ -44,11 +44,11 @@ def authorize_params super.tap do |params| params['scope'] = format_scopes(params['scope']) if (params['request_visible_actions']) params['request_visible_actions'] = format_actions(params['request_visible_actions']) - end + end custom_parameters(params) end end private @@ -68,18 +68,15 @@ def format_scope(scope) "https://www.googleapis.com/auth/#{scope}" end def custom_parameters(params) - ["scope", "client_options", "state", "request_visible_actions"].each { |k| add_key_to_params(params, k) } + ["scope", "client_options", "request_visible_actions"].each { |k| add_key_to_params(params, k) } end def add_key_to_params(params, key) if request.params[key] params[key] = request.params[key] - - # to support omniauth-oauth2's auto csrf protection - session['omniauth.state'] = params[:state] if key == 'state' end end def raw_info access_token.options[:mode] = :query