improvement: update to not use /documents google scope, since it requires extensive approvals

This commit is contained in:
Waleed Latif
2025-03-21 12:40:48 -07:00
parent ee3d8bc343
commit dc0248ded1
6 changed files with 5 additions and 15 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ export const GoogleDocsBlock: BlockConfig<GoogleDocsResponse> = {
layout: 'full',
provider: 'google-docs',
serviceId: 'google-docs',
requiredScopes: ['https://www.googleapis.com/auth/documents'],
requiredScopes: ['https://www.googleapis.com/auth/drive.file'],
placeholder: 'Select Google account',
},
// Document Selector for read operation
-1
View File
@@ -220,7 +220,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/documents',
'https://www.googleapis.com/auth/drive.file',
],
prompt: 'consent',
+1 -4
View File
@@ -85,10 +85,7 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = {
providerId: 'google-docs',
icon: (props) => GoogleDocsIcon(props),
baseProviderIcon: (props) => GoogleIcon(props),
scopes: [
'https://www.googleapis.com/auth/documents',
'https://www.googleapis.com/auth/drive.file',
],
scopes: ['https://www.googleapis.com/auth/drive.file'],
},
'google-sheets': {
id: 'google-sheets',
+1 -4
View File
@@ -12,10 +12,7 @@ export const createTool: ToolConfig<GoogleDocsToolParams, GoogleDocsCreateRespon
oauth: {
required: true,
provider: 'google-docs',
additionalScopes: [
'https://www.googleapis.com/auth/documents',
'https://www.googleapis.com/auth/drive',
],
additionalScopes: ['https://www.googleapis.com/auth/drive.file'],
},
params: {
accessToken: { type: 'string', required: true },
+1 -1
View File
@@ -9,7 +9,7 @@ export const readTool: ToolConfig<GoogleDocsToolParams, GoogleDocsReadResponse>
oauth: {
required: true,
provider: 'google-docs',
additionalScopes: ['https://www.googleapis.com/auth/documents'],
additionalScopes: ['https://www.googleapis.com/auth/drive.file'],
},
params: {
accessToken: { type: 'string', required: true },
+1 -4
View File
@@ -9,10 +9,7 @@ export const writeTool: ToolConfig<GoogleDocsToolParams, GoogleDocsWriteResponse
oauth: {
required: true,
provider: 'google-docs',
additionalScopes: [
'https://www.googleapis.com/auth/documents',
'https://www.googleapis.com/auth/drive',
],
additionalScopes: ['https://www.googleapis.com/auth/drive.file'],
},
params: {
accessToken: { type: 'string', required: true },