feat(Slack Node): Allow users to configure OAuth2 scopes#28728
Merged
Joffcom merged 10 commits intoApr 28, 2026
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
No issues found across 2 files
Architecture diagram
sequenceDiagram
participant User as User (Browser)
participant UI as n8n Credential UI
participant Server as n8n Server (OAuth Engine)
participant Slack as Slack Auth Server
Note over User,UI: Configuration Phase
User->>UI: Toggle "Custom Scopes" (NEW)
UI-->>User: Show "User Scope" field (NEW)
User->>UI: Modify scopes in "User Scope" field
Note over User,Slack: Authorization Flow
User->>UI: Click "Connect my account"
UI->>Server: Initialize OAuth2 Flow
Server->>Server: Evaluate authQueryParameters expression (CHANGED)
alt customScopes is TRUE
Server->>Server: Use values from "User Scope" field
else customScopes is FALSE (Default)
Server->>Server: Use internal default userScope list
end
Note right of Server: CHANGED: 'scope' parameter set to empty string<br/>to prevent bot-scope inheritance.
Server-->>User: Redirect to Slack Authorization URL
User->>Slack: GET /authorize?user_scope={selected_scopes}&scope=
Note over Slack,User: Slack Consent Screen
Slack-->>User: Show requested user-level permissions
User->>Slack: Approve permissions
Slack-->>Server: Callback with Code
Server->>Slack: POST /api/oauth.v2.access (Exchange code for token)
Slack-->>Server: Return Access Token
Server-->>UI: Credential Saved Successfully
Contributor
Performance ComparisonComparing current → latest master → 14-day baseline Idle baseline with Instance AI module loaded
docker-stats
Memory consumption baseline with starter plan resources
How to read this table
|
DawidMyslak
requested changes
Apr 21, 2026
Contributor
DawidMyslak
left a comment
There was a problem hiding this comment.
Looks good overall, 2 minor comments 🙏
…redentials-remove-hardcoded-oauth2-scopes-and-let-the
…ed-oauth2-scopes-and-let-the
…redentials-remove-hardcoded-oauth2-scopes-and-let-the
…ed-oauth2-scopes-and-let-the
DawidMyslak
approved these changes
Apr 27, 2026
…ed-oauth2-scopes-and-let-the
…ed-oauth2-scopes-and-let-the
Merged
Contributor
|
Got released with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the previously hardcoded OAuth2
user_scopelist in the Slack credential with a user-configurable field. By default, the credential behaves identically to before — the same full set of user scopes is requested automatically. Users who need a restricted or custom scope set can enable the Custom Scopes toggle to expose and edit theUser Scopefield before connecting.Changes:
customScopesboolean toggle (default:false) to the Slack OAuth2 credentialuserScopestring field (shown whencustomScopesistrue) pre-populated with the default scope listscopehidden field to prevent bot-scope inheritance from the base credentialauthQueryParametersto dynamically use the customuserScopewhen enabled, or fall back to the default scope list otherwiseTo test:
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/NODE-3815
Review / Merge checklist
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)🤖 PR Summary generated by AI