kmrshntr / omniauth-slack

omniauth-slack
MIT License
95 stars 156 forks source link

Are WORKSPACE tokens working? #64

Closed rdlh closed 6 years ago

rdlh commented 6 years ago

Is there a way to use workspace tokens with this gem?

ginjo commented 6 years ago

I'm guessing that omniauth-slack will not yet work with workspace tokens. However, from what I can see, I don't think it will be that much trouble to get it going. I'll try to put something basic together (in the ginjo fork).

I think the bigger job will be updating the various Slack API gems (and the apps that use them) to work with the new API model.

EDIT:

Whoa, wait a minute. it DOES WORK. I just ran a basic auth cycle using ginjo fork of omniauth-slack against a "new" Slack app using workspace tokens, and it happily returned a workspace token. The AuthHash object isn't perfect, but it IS populated with everything that came back from the Slack call to oauth.access. The scopes work differently and will require some studying to get right. But all-in-all I think it's usable. See this gist for the resulting omniauth-slack AuthHash object.

ginjo commented 6 years ago

Hi @rdlh , Just FYI I've updated the ginjo fork to support workspace apps and tokens.

rdlh commented 6 years ago

You rock @ginjo (sorry for my late reply)