Skip to content

Commit 2efa15a

Browse files
authored
PLU-620: reduce Slack scopes (#1353)
## Problem Slack integration requests for a lot of scopes when adding the app to a workplace. ## Solution Use the least permissive access required. ## Other changes Renamed auth fields to `Client ID` and `Client Secret` to match the names on Slack. ## Tests - [ ] Can still add app to Plumber - [ ] Can send message to public channel as user - [ ] Can send message to public channel as bot - [ ] Can set bot name - [ ] Can set bot icon - [ ] Can send message to private channel as user - [ ] Can search for messages ## Before & After Screenshots <img width="601" height="430" alt="Screenshot 2025-12-02 at 10 56 35 AM" src="https://github.com/user-attachments/assets/a525fe87-0540-42f8-a303-70dbce672f9c" /> <img width="598" height="414" alt="Screenshot 2025-12-02 at 10 56 41 AM" src="https://github.com/user-attachments/assets/427c7e9a-dd7b-4601-8ef0-b2548d2299da" /> <img width="593" height="409" alt="Screenshot 2025-12-02 at 10 56 47 AM" src="https://github.com/user-attachments/assets/22412234-5e7f-4947-8597-a1360ab59c35" /> <img width="615" height="687" alt="Screenshot 2025-12-02 at 11 06 48 AM" src="https://github.com/user-attachments/assets/9624a71e-8b70-4e05-954d-41ddc79c73dd" />
1 parent 5f25880 commit 2efa15a

File tree

2 files changed

+4
-42
lines changed

2 files changed

+4
-42
lines changed

packages/backend/src/apps/slack/auth/generate-auth-url.ts

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,8 @@ import type {
66

77
import qs from 'qs'
88

9-
const scopes = [
10-
'channels:manage',
11-
'channels:read',
12-
'channels:join',
13-
'chat:write',
14-
'chat:write.customize',
15-
'chat:write.public',
16-
'files:write',
17-
'im:write',
18-
'mpim:write',
19-
'team:read',
20-
'users.profile:read',
21-
'users:read',
22-
'workflow.steps:execute',
23-
'users:read.email',
24-
'commands',
25-
]
26-
const userScopes = [
27-
'channels:history',
28-
'channels:read',
29-
'channels:write',
30-
'chat:write',
31-
'emoji:read',
32-
'files:read',
33-
'files:write',
34-
'groups:history',
35-
'groups:read',
36-
'groups:write',
37-
'im:write',
38-
'mpim:write',
39-
'reactions:read',
40-
'reminders:write',
41-
'search:read',
42-
'stars:read',
43-
'team:read',
44-
'users.profile:read',
45-
'users.profile:write',
46-
'users:read',
47-
'users:read.email',
48-
]
9+
const scopes = ['chat:write', 'chat:write.customize', 'chat:write.public']
10+
const userScopes = ['channels:read', 'chat:write', 'search:read', 'users:read']
4911

5012
export default async function generateAuthUrl($: IGlobalVariable) {
5113
// Our own auth, so safe to cast $.app.auth

packages/backend/src/apps/slack/auth/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const auth: IUserAddedConnectionAuth = {
2222
},
2323
{
2424
key: 'consumerKey',
25-
label: 'API Key',
25+
label: 'Client ID',
2626
type: 'string' as const,
2727
required: true,
2828
readOnly: false,
@@ -33,7 +33,7 @@ const auth: IUserAddedConnectionAuth = {
3333
},
3434
{
3535
key: 'consumerSecret',
36-
label: 'API Secret',
36+
label: 'Client Secret',
3737
type: 'string' as const,
3838
required: true,
3939
readOnly: false,

0 commit comments

Comments
 (0)