Skip to content

Commit af4dbb6

Browse files
author
waleed
committed
aligned oauth.ts, auth.ts, and block definitions for all 29 providers
1 parent 1f5a770 commit af4dbb6

9 files changed

Lines changed: 37 additions & 13 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/credential-selector/components/oauth-required-modal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const SCOPE_DESCRIPTIONS: Record<string, string> = {
5151
'write:confluence-content': 'Create and edit Confluence pages',
5252
'write:confluence-space': 'Manage Confluence spaces',
5353
'write:confluence-file': 'Upload files to Confluence',
54+
'read:content:confluence': 'Read Confluence content',
5455
'read:page:confluence': 'View Confluence pages',
5556
'write:page:confluence': 'Create and update Confluence pages',
5657
'read:comment:confluence': 'View comments on Confluence pages',

apps/sim/blocks/blocks/airtable.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
3434
type: 'oauth-input',
3535
provider: 'airtable',
3636
serviceId: 'airtable',
37-
requiredScopes: ['data.records:read', 'data.records:write'], // Keep both scopes
37+
requiredScopes: [
38+
'data.records:read',
39+
'data.records:write',
40+
'user.email:read',
41+
'webhook:manage',
42+
],
3843
placeholder: 'Select Airtable account',
3944
required: true,
4045
},

apps/sim/blocks/blocks/google_form.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ export const GoogleFormsBlock: BlockConfig = {
2020
required: true,
2121
provider: 'google-forms',
2222
serviceId: 'google-forms',
23-
requiredScopes: [],
23+
requiredScopes: [
24+
'https://www.googleapis.com/auth/userinfo.email',
25+
'https://www.googleapis.com/auth/userinfo.profile',
26+
'https://www.googleapis.com/auth/forms.responses.readonly',
27+
],
2428
placeholder: 'Select Google account',
2529
},
2630
{

apps/sim/blocks/blocks/google_sheets.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ export const GoogleSheetsBlock: BlockConfig<GoogleSheetsResponse> = {
3636
required: true,
3737
provider: 'google-sheets',
3838
serviceId: 'google-sheets',
39-
requiredScopes: [],
39+
requiredScopes: [
40+
'https://www.googleapis.com/auth/drive.readonly',
41+
'https://www.googleapis.com/auth/drive.file',
42+
],
4043
placeholder: 'Select Google account',
4144
},
4245
// Spreadsheet Selector
@@ -47,7 +50,10 @@ export const GoogleSheetsBlock: BlockConfig<GoogleSheetsResponse> = {
4750
canonicalParamId: 'spreadsheetId',
4851
provider: 'google-drive',
4952
serviceId: 'google-drive',
50-
requiredScopes: [],
53+
requiredScopes: [
54+
'https://www.googleapis.com/auth/drive.readonly',
55+
'https://www.googleapis.com/auth/drive.file',
56+
],
5157
mimeType: 'application/vnd.google-apps.spreadsheet',
5258
placeholder: 'Select a spreadsheet',
5359
dependsOn: ['credential'],

apps/sim/blocks/blocks/microsoft_excel.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@ export const MicrosoftExcelBlock: BlockConfig<MicrosoftExcelResponse> = {
3232
type: 'oauth-input',
3333
provider: 'microsoft-excel',
3434
serviceId: 'microsoft-excel',
35-
requiredScopes: [],
35+
requiredScopes: [
36+
'openid',
37+
'profile',
38+
'email',
39+
'Files.Read',
40+
'Files.ReadWrite',
41+
'offline_access',
42+
],
3643
placeholder: 'Select Microsoft account',
3744
required: true,
3845
},

apps/sim/blocks/blocks/sharepoint.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@ export const SharepointBlock: BlockConfig<SharepointResponse> = {
4343
'openid',
4444
'profile',
4545
'email',
46-
'Files.Read',
47-
'Files.ReadWrite',
4846
'Sites.Read.All',
4947
'Sites.ReadWrite.All',
48+
'Sites.Manage.All',
5049
'offline_access',
5150
],
5251
placeholder: 'Select Microsoft account',

apps/sim/blocks/blocks/slack.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
5959
'chat:write.public',
6060
'users:read',
6161
'files:write',
62+
'files:read',
6263
'canvases:write',
64+
'reactions:write',
6365
],
6466
placeholder: 'Select Slack workspace',
6567
condition: {

apps/sim/blocks/blocks/x.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const XBlock: BlockConfig<XResponse> = {
3333
type: 'oauth-input',
3434
provider: 'x',
3535
serviceId: 'x',
36-
requiredScopes: ['tweet.read', 'tweet.write', 'users.read'],
36+
requiredScopes: ['tweet.read', 'tweet.write', 'users.read', 'offline.access'],
3737
placeholder: 'Select X account',
3838
},
3939
{

apps/sim/lib/oauth/oauth.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,19 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = {
258258
'Chat.Read',
259259
'Chat.ReadWrite',
260260
'Chat.ReadBasic',
261+
'ChatMessage.Send',
261262
'Channel.ReadBasic.All',
262263
'ChannelMessage.Send',
263264
'ChannelMessage.Read.All',
265+
'ChannelMessage.ReadWrite',
264266
'ChannelMember.Read.All',
265267
'Group.Read.All',
266268
'Group.ReadWrite.All',
267269
'Team.ReadBasic.All',
270+
'TeamMember.Read.All',
268271
'offline_access',
269272
'Files.Read',
270273
'Sites.Read.All',
271-
'TeamMember.Read.All',
272274
],
273275
},
274276
outlook: {
@@ -397,12 +399,10 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = {
397399
'delete:attachment:confluence',
398400
'read:content:confluence',
399401
'delete:page:confluence',
400-
'write:label:confluence',
401402
'read:label:confluence',
403+
'write:label:confluence',
402404
'read:attachment:confluence',
403405
'write:attachment:confluence',
404-
'read:label:confluence',
405-
'write:label:confluence',
406406
'search:confluence',
407407
'read:me',
408408
'offline_access',
@@ -479,7 +479,7 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = {
479479
providerId: 'airtable',
480480
icon: (props) => AirtableIcon(props),
481481
baseProviderIcon: (props) => AirtableIcon(props),
482-
scopes: ['data.records:read', 'data.records:write'],
482+
scopes: ['data.records:read', 'data.records:write', 'user.email:read', 'webhook:manage'],
483483
},
484484
},
485485
defaultService: 'airtable',

0 commit comments

Comments
 (0)