Skip to content

Commit

Permalink
Override the callback_path method
Browse files Browse the repository at this point in the history
  • Loading branch information
bzf committed Aug 22, 2016
1 parent 8cb9074 commit 460e43d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/omniauth/strategies/twitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ def callback_url
request.params['callback_url'] || super
end

def callback_path
params = session["omniauth.params"]

if params.nil? || params["callback_url"].nil?
super
else
URI(params["callback_url"]).path
end
end

private

def image_url
Expand Down

0 comments on commit 460e43d

Please sign in to comment.