mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
improvement: update to not use /documents google scope, since it requires extensive approvals
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user