-
Notifications
You must be signed in to change notification settings - Fork 3.7k
fix(slack): stop requesting unapproved OAuth scopes that break connect #5631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -735,9 +735,12 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = { | |
| 'groups:write', | ||
| 'chat:write', | ||
| 'chat:write.public', | ||
| 'assistant:write', | ||
| 'app_mentions:read', | ||
| 'im:history', | ||
| // TODO: Re-add once Slack app review approves these. Requesting a scope | ||
| // the app is not yet approved for makes Slack reject the entire | ||
| // authorization with "unapproved permissions requested", breaking connect. | ||
| // 'assistant:write', | ||
| // 'app_mentions:read', | ||
| // 'im:history', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New Slack connections no longer request
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is correct, our current oauth app does not have permissions. |
||
| 'im:write', | ||
| 'im:read', | ||
| 'users:read', | ||
|
|
@@ -748,7 +751,7 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = { | |
| 'canvases:write', | ||
| 'reactions:write', | ||
| 'reactions:read', | ||
| 'pins:read', | ||
| // TODO: Add 'pins:read' once Slack app review is approved | ||
| ], | ||
| }, | ||
| }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a user connects Slack after this change, the issued token no longer includes
assistant:write, but the Slack block still exposesset_status,set_title, andset_suggested_prompts. Those operations call Slackassistant.threads.*APIs, so newly connected workflows can pass OAuth and then fail at runtime withmissing_scope.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct, our native slack app doesn't have permissions.