Fix small errors

This commit is contained in:
Ilya Zverev 2017-02-22 19:22:10 +03:00
parent 72851c92ea
commit 6522e41d49
2 changed files with 17 additions and 1 deletions

View file

@ -1,6 +1,6 @@
module OmniAuth
module MapsMe
VERSION = "1.0.2"
VERSION = "1.0.3"
end
module MapsMeToken

View file

@ -95,6 +95,22 @@ module OmniAuth
fail!(:failed_to_connect, e)
end
def mock_callback_call
# Copying the parent implementation just so we can replace the provider name
setup_phase
@env['omniauth.origin'] = session.delete('omniauth.origin')
@env['omniauth.origin'] = nil if env['omniauth.origin'] == ''
mocked_auth = OmniAuth.mock_auth_for(:mapsme)
if mocked_auth.is_a?(Symbol)
fail!(mocked_auth)
else
@env['omniauth.auth'] = mocked_auth
@env['omniauth.params'] = session.delete('omniauth.params') || {}
OmniAuth.config.before_callback_phase.call(@env) if OmniAuth.config.before_callback_phase
call_app!
end
end
protected
def deep_symbolize(hash)