diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/components/oauth-required-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/components/oauth-required-modal.tsx index c761dbf29..aa31d8ea1 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/components/oauth-required-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/components/oauth-required-modal.tsx @@ -36,7 +36,6 @@ const SCOPE_DESCRIPTIONS: Record = { 'https://www.googleapis.com/auth/gmail.send': 'Send emails on your behalf', 'https://www.googleapis.com/auth/gmail.labels': 'View and manage your email labels', 'https://www.googleapis.com/auth/gmail.modify': 'View and manage your email messages', - 'https://www.googleapis.com/auth/drive.readonly': 'View and read your Google Drive files', 'https://www.googleapis.com/auth/drive.file': 'View and manage your Google Drive files', 'https://www.googleapis.com/auth/calendar': 'View and manage your calendar', 'https://www.googleapis.com/auth/userinfo.email': 'View your email address', diff --git a/apps/sim/blocks/blocks/google_docs.ts b/apps/sim/blocks/blocks/google_docs.ts index 1b261155b..9f85f1c45 100644 --- a/apps/sim/blocks/blocks/google_docs.ts +++ b/apps/sim/blocks/blocks/google_docs.ts @@ -35,10 +35,7 @@ export const GoogleDocsBlock: BlockConfig = { required: true, provider: 'google-docs', serviceId: 'google-docs', - requiredScopes: [ - 'https://www.googleapis.com/auth/drive.readonly', - 'https://www.googleapis.com/auth/drive.file', - ], + requiredScopes: ['https://www.googleapis.com/auth/drive.file'], placeholder: 'Select Google account', }, // Document selector (basic mode) diff --git a/apps/sim/blocks/blocks/google_drive.ts b/apps/sim/blocks/blocks/google_drive.ts index d109a8550..a8885a481 100644 --- a/apps/sim/blocks/blocks/google_drive.ts +++ b/apps/sim/blocks/blocks/google_drive.ts @@ -36,10 +36,7 @@ export const GoogleDriveBlock: BlockConfig = { required: true, provider: 'google-drive', serviceId: 'google-drive', - requiredScopes: [ - 'https://www.googleapis.com/auth/drive.readonly', - 'https://www.googleapis.com/auth/drive.file', - ], + requiredScopes: ['https://www.googleapis.com/auth/drive.file'], placeholder: 'Select Google Drive account', }, // Create/Upload File Fields @@ -106,10 +103,7 @@ export const GoogleDriveBlock: BlockConfig = { canonicalParamId: 'folderId', provider: 'google-drive', serviceId: 'google-drive', - requiredScopes: [ - 'https://www.googleapis.com/auth/drive.readonly', - 'https://www.googleapis.com/auth/drive.file', - ], + requiredScopes: ['https://www.googleapis.com/auth/drive.file'], mimeType: 'application/vnd.google-apps.folder', placeholder: 'Select a parent folder', mode: 'basic', @@ -179,10 +173,7 @@ export const GoogleDriveBlock: BlockConfig = { canonicalParamId: 'folderId', provider: 'google-drive', serviceId: 'google-drive', - requiredScopes: [ - 'https://www.googleapis.com/auth/drive.readonly', - 'https://www.googleapis.com/auth/drive.file', - ], + requiredScopes: ['https://www.googleapis.com/auth/drive.file'], mimeType: 'application/vnd.google-apps.folder', placeholder: 'Select a parent folder', mode: 'basic', @@ -207,10 +198,7 @@ export const GoogleDriveBlock: BlockConfig = { canonicalParamId: 'folderId', provider: 'google-drive', serviceId: 'google-drive', - requiredScopes: [ - 'https://www.googleapis.com/auth/drive.readonly', - 'https://www.googleapis.com/auth/drive.file', - ], + requiredScopes: ['https://www.googleapis.com/auth/drive.file'], mimeType: 'application/vnd.google-apps.folder', placeholder: 'Select a folder to list files from', mode: 'basic', @@ -249,10 +237,7 @@ export const GoogleDriveBlock: BlockConfig = { canonicalParamId: 'fileId', provider: 'google-drive', serviceId: 'google-drive', - requiredScopes: [ - 'https://www.googleapis.com/auth/drive.readonly', - 'https://www.googleapis.com/auth/drive.file', - ], + requiredScopes: ['https://www.googleapis.com/auth/drive.file'], placeholder: 'Select a file to download', mode: 'basic', dependsOn: ['credential'], diff --git a/apps/sim/blocks/blocks/google_sheets.ts b/apps/sim/blocks/blocks/google_sheets.ts index 4af33ed2c..6d16a2747 100644 --- a/apps/sim/blocks/blocks/google_sheets.ts +++ b/apps/sim/blocks/blocks/google_sheets.ts @@ -36,10 +36,7 @@ export const GoogleSheetsBlock: BlockConfig = { required: true, provider: 'google-sheets', serviceId: 'google-sheets', - requiredScopes: [ - 'https://www.googleapis.com/auth/drive.readonly', - 'https://www.googleapis.com/auth/drive.file', - ], + requiredScopes: ['https://www.googleapis.com/auth/drive.file'], placeholder: 'Select Google account', }, // Spreadsheet Selector @@ -50,10 +47,7 @@ export const GoogleSheetsBlock: BlockConfig = { canonicalParamId: 'spreadsheetId', provider: 'google-sheets', serviceId: 'google-sheets', - requiredScopes: [ - 'https://www.googleapis.com/auth/drive.readonly', - 'https://www.googleapis.com/auth/drive.file', - ], + requiredScopes: ['https://www.googleapis.com/auth/drive.file'], mimeType: 'application/vnd.google-apps.spreadsheet', placeholder: 'Select a spreadsheet', dependsOn: ['credential'], diff --git a/apps/sim/lib/auth.ts b/apps/sim/lib/auth.ts index 58312bec6..b4ff5b465 100644 --- a/apps/sim/lib/auth.ts +++ b/apps/sim/lib/auth.ts @@ -429,7 +429,6 @@ export const auth = betterAuth({ scopes: [ 'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/userinfo.profile', - 'https://www.googleapis.com/auth/drive.readonly', 'https://www.googleapis.com/auth/drive.file', ], prompt: 'consent', @@ -444,7 +443,6 @@ export const auth = betterAuth({ scopes: [ 'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/userinfo.profile', - 'https://www.googleapis.com/auth/drive.readonly', 'https://www.googleapis.com/auth/drive.file', ], prompt: 'consent', @@ -459,7 +457,6 @@ export const auth = betterAuth({ scopes: [ 'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/userinfo.profile', - 'https://www.googleapis.com/auth/drive.readonly', 'https://www.googleapis.com/auth/drive.file', ], prompt: 'consent', diff --git a/apps/sim/lib/oauth/oauth.ts b/apps/sim/lib/oauth/oauth.ts index cda153f5b..3a8dfd486 100644 --- a/apps/sim/lib/oauth/oauth.ts +++ b/apps/sim/lib/oauth/oauth.ts @@ -140,10 +140,7 @@ export const OAUTH_PROVIDERS: Record = { providerId: 'google-drive', icon: (props) => GoogleDriveIcon(props), baseProviderIcon: (props) => GoogleIcon(props), - scopes: [ - 'https://www.googleapis.com/auth/drive.readonly', - 'https://www.googleapis.com/auth/drive.file', - ], + scopes: ['https://www.googleapis.com/auth/drive.file'], scopeHints: ['drive'], }, 'google-docs': { @@ -153,10 +150,7 @@ export const OAUTH_PROVIDERS: Record = { providerId: 'google-docs', icon: (props) => GoogleDocsIcon(props), baseProviderIcon: (props) => GoogleIcon(props), - scopes: [ - 'https://www.googleapis.com/auth/drive.readonly', - 'https://www.googleapis.com/auth/drive.file', - ], + scopes: ['https://www.googleapis.com/auth/drive.file'], scopeHints: ['docs'], }, 'google-sheets': { @@ -166,10 +160,7 @@ export const OAUTH_PROVIDERS: Record = { providerId: 'google-sheets', icon: (props) => GoogleSheetsIcon(props), baseProviderIcon: (props) => GoogleIcon(props), - scopes: [ - 'https://www.googleapis.com/auth/drive.readonly', - 'https://www.googleapis.com/auth/drive.file', - ], + scopes: ['https://www.googleapis.com/auth/drive.file'], scopeHints: ['sheets'], }, 'google-forms': {