omniauth-slack icon indicating copy to clipboard operation
omniauth-slack copied to clipboard

Validate team attribute to make sure it's an ID, not a name

Open technicalpickles opened this issue 10 years ago • 0 comments
trafficstars

I ran into this while getting started. Given the example:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :slack, "API_KEY", "API_SECRET", scope: "identify,read,post", team: 'XXXXXXXX'
end

XXXXXXXX needs to be a team ID, like TXXXX, rather than a Team domain name, like my-awesome-team. It should be possible to check this with regex at startup time.

I left feedback with Slack to implement at the server level, so they raise an error if you pass an invalid Team ID (like when using a team domain instead).

technicalpickles avatar Sep 25 '15 18:09 technicalpickles