Skip to content

Commit

Permalink
Added missing authorize_params method to pass scope and team through …
Browse files Browse the repository at this point in the history
…to slack oauth.
  • Loading branch information
marclennox committed Jun 13, 2015
1 parent fdff681 commit 1256971
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/omniauth/strategies/slack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ class Slack < OmniAuth::Strategies::OAuth2
{:raw_info => raw_info, :user_info => user_info}
end

def authorize_params
super.tap do |params|
%w[scope team].each do |v|
if request.params[v]
params[v.to_sym] = request.params[v]
end
end
end
end

def user_info
@user_info ||= access_token.get("/api/users.info?user=#{raw_info['user_id']}").parsed
end
Expand Down

0 comments on commit 1256971

Please sign in to comment.