Permalink
Browse files

Allow passing params from initial auth link to callback

  • Loading branch information...
1 parent 1bfab1e commit 5271a9d353741f9de80445b24b9a1c258ee4e079 @sferik sferik committed May 24, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 oa-core/lib/omniauth/strategy.rb
@@ -126,6 +126,8 @@ def request_phase
def callback_phase
@env['omniauth.auth'] = auth_hash
+ @env['omniauth.params'] = session['query_params'] || {}
+ session['query_params'] = nil if session['query_params']
call_app!
end
@@ -155,6 +157,7 @@ def query_string
def call_through_to_app
status, headers, body = *call_app!
+ session['query_params'] = Rack::Request.new(env).params
@response = Rack::Response.new(body, status, headers)
status == 404 ? nil : @response.finish

0 comments on commit 5271a9d

Please sign in to comment.