omniauth-slack
omniauth-slack copied to clipboard
Validate team attribute to make sure it's an ID, not a name
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).