Merge pull request #475 from pivotaldinamundo/0-3-stable

Make sure query params are copied over to omniauth.params in test mode.
This commit is contained in:
Michael Bleigh 2011-11-02 06:52:27 -07:00
Родитель 88e6d7ed3f 2fb469bdd7
Коммит d7fbd6164d
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -107,6 +107,7 @@ module OmniAuth
@env['omniauth.auth'] = mocked_auth
@env['omniauth.origin'] = session.delete('omniauth.origin')
@env['omniauth.origin'] = nil if env['omniauth.origin'] == ''
copy_query_params
call_app!
end
end
@ -124,10 +125,14 @@ module OmniAuth
raise NotImplementedError
end
def callback_phase
@env['omniauth.auth'] = auth_hash
def copy_query_params
@env['omniauth.params'] = session['query_params'] || {}
session['query_params'] = nil if session['query_params']
end
def callback_phase
@env['omniauth.auth'] = auth_hash
copy_query_params
call_app!
end