Skip to content

Commit

Permalink
Allow passing params from initial auth link to callback
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed May 24, 2011
1 parent 1bfab1e commit 5271a9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions oa-core/lib/omniauth/strategy.rb
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5271a9d

Please sign in to comment.