Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Allow passing params from initial auth link to callback

  • Loading branch information...
commit 5271a9d353741f9de80445b24b9a1c258ee4e079 1 parent 1bfab1e
Erik Michaels-Ober sferik authored

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. +3 0  oa-core/lib/omniauth/strategy.rb
3  oa-core/lib/omniauth/strategy.rb
@@ -126,6 +126,8 @@ def request_phase
126 126
127 127 def callback_phase
128 128 @env['omniauth.auth'] = auth_hash
  129 + @env['omniauth.params'] = session['query_params'] || {}
  130 + session['query_params'] = nil if session['query_params']
129 131 call_app!
130 132 end
131 133
@@ -155,6 +157,7 @@ def query_string
155 157
156 158 def call_through_to_app
157 159 status, headers, body = *call_app!
  160 + session['query_params'] = Rack::Request.new(env).params
158 161 @response = Rack::Response.new(body, status, headers)
159 162
160 163 status == 404 ? nil : @response.finish

0 comments on commit 5271a9d

Please sign in to comment.
Something went wrong with that request. Please try again.