You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there! I'm in the process of migrating Slack V1 App to V2 but ran into an error.
The code here expects that access_token is required, but in fact with Slack V2, access_token (meaning the "bot token") can be missing from the response object if the client only requested for "user-scoped permissions". See Slack oauth.v2.access docs.
A proposed solution is to override the OAuth2AccessTokenJsonExtractor#createToken(String rawResponse) method in SlackJsonTokenExtractor, making the access token an optional parameter instead of a required one.
Happy to do the PR for this if the owner is happy with the proposed solution 😄
The text was updated successfully, but these errors were encountered:
Issue: scribejava#1023
Slack does not always provide the bot access token, if you don't ask for those scopes.
This
Note - the underlying OAuth2AccessToken has a Precondition for "access_token can't be null", so here it is provided with an empty string.
Hi there! I'm in the process of migrating Slack V1 App to V2 but ran into an error.
The code here expects that
access_token
is required, but in fact with Slack V2,access_token
(meaning the "bot token") can be missing from the response object if the client only requested for "user-scoped permissions". See Slack oauth.v2.access docs.scribejava/scribejava-core/src/main/java/com/github/scribejava/core/extractors/OAuth2AccessTokenJsonExtractor.java
Line 90 in 1247459
A proposed solution is to override the
OAuth2AccessTokenJsonExtractor#createToken(String rawResponse)
method inSlackJsonTokenExtractor
, making the access token an optional parameter instead of a required one.Happy to do the PR for this if the owner is happy with the proposed solution 😄
The text was updated successfully, but these errors were encountered: