Skip to content

Commit

Permalink
Invalid omniauth redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
troggy authored and Sébastien Fieloux committed Aug 19, 2015
1 parent ebd1d5e commit 76006d8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ def redirect_callbacks
# derive target redirect route from 'resource_class' param, which was set
# before authentication.
devise_mapping = request.env['omniauth.params']['resource_class'].underscore.to_sym
redirect_route = "/#{Devise.mappings[devise_mapping].as_json["path"]}/#{params[:provider]}/callback"
redirect_route = File.join(request.protocol, request.host_with_port, Devise.mappings[devise_mapping].as_json["path"],
params[:provider], 'callback')


# preserve omniauth info for success route. ignore 'extra' in twitter
# auth response to avoid CookieOverflow.
Expand Down

0 comments on commit 76006d8

Please sign in to comment.