1
0
Fork 0
mirror of https://github.com/omniauth/omniauth.git synced 2022-11-09 12:31:49 -05:00

Use session method instead of @env['rack.session']

This commit is contained in:
yui-knk 2015-08-03 23:28:09 +09:00
parent c3e3aa5bbf
commit df08ba7838

View file

@ -268,9 +268,9 @@ module OmniAuth
session['omniauth.params'] = request.params session['omniauth.params'] = request.params
OmniAuth.config.before_request_phase.call(env) if OmniAuth.config.before_request_phase OmniAuth.config.before_request_phase.call(env) if OmniAuth.config.before_request_phase
if request.params['origin'] if request.params['origin']
@env['rack.session']['omniauth.origin'] = request.params['origin'] session['omniauth.origin'] = request.params['origin']
elsif env['HTTP_REFERER'] && !env['HTTP_REFERER'].match(/#{request_path}$/) elsif env['HTTP_REFERER'] && !env['HTTP_REFERER'].match(/#{request_path}$/)
@env['rack.session']['omniauth.origin'] = env['HTTP_REFERER'] session['omniauth.origin'] = env['HTTP_REFERER']
end end
redirect(callback_url) redirect(callback_url)