Skip to content

passport-slack-oauth2 is NOT using the new oauth flow by slack #9

@HazemSayad

Description

@HazemSayad

I created a new app in slack and noticed that the scopes I am adding from slack's oauth scopes https://api.slack.com/scopes are not working and resulting in an error
But trying scopes from the legacy tag https://api.slack.com/scopes?filter=bot would work

using the commands scope would fail while using the bot scope would work.

commands scope is new, while bot scope is now legacy

New Slack apps are installed with a V2 OAuth 2.0 flow.

We're sorry about the double V2s: OAuth 2.0 refers to the 2.0 version of the OAuth spec, and this is our second version of OAuth 2.0. For the rest of this guide, we'll just call it OAuth and drop all the 2s.

The OAuth flow for new Slack apps works exactly the same way as the OAuth flow for classic Slack apps. Only a few details have changed slightly: URL and method names have gained a v2, and the shape of the OAuth access response now puts bot access tokens first.

We've created this V2 OAuth flow because it provides more granular Slack scopes, especially for bot users. With the new OAuth flow, your app can act with its own identity, instead of acting on behalf of users—all without requesting excessive permissions that could cause installs to be rejected.

https://api.slack.com/authentication/oauth-v2

Will the strategy be updated to the new oauth2.0 flow by slack anytime soon?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions