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

Merge branch 'master' of https://github.com/afn/omniauth into afn-master

This commit is contained in:
Tom Milewski 2017-02-12 01:04:04 -05:00
commit af03d3ae4c
No known key found for this signature in database
GPG key ID: 0C45B110F8B40F20

View file

@ -287,13 +287,14 @@ module OmniAuth
setup_phase
@env['omniauth.origin'] = session.delete('omniauth.origin')
@env['omniauth.origin'] = nil if env['omniauth.origin'] == ''
@env['omniauth.params'] = session.delete('omniauth.params') || {}
@env['omniauth.headers'] = session.delete('omniauth.headers') || {}
mocked_auth = OmniAuth.mock_auth_for(name.to_s)
if mocked_auth.is_a?(Symbol)
fail!(mocked_auth)
else
@env['omniauth.auth'] = mocked_auth
@env['omniauth.params'] = session.delete('omniauth.params') || {}
@env['omniauth.headers'] = session.delete('omniauth.headers') || {}
OmniAuth.config.before_callback_phase.call(@env) if OmniAuth.config.before_callback_phase
call_app!
end