-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(scopes): removed scope from google #2098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryRemoved Critical Impact:
Behavior Change: This creates a breaking change for existing workflows that rely on accessing pre-existing Drive files. The PR description indicates this is temporary until a new scope is approved. Confidence Score: 1/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant UI as OAuth Modal
participant Auth as auth.ts
participant Block as Google Drive Block
participant API as Google Drive API
User->>UI: Select Google Drive operation
UI->>Auth: Request OAuth with scopes
Note over Auth: OLD: drive.readonly + drive.file<br/>NEW: drive.file only
Auth->>API: Authenticate with drive.file scope
API-->>Auth: Access token (limited to app-created files)
Auth-->>Block: Provide access token
alt Download/List existing file
User->>Block: Select existing file via file-selector
Block->>API: Request file metadata/content
API-->>Block: 403 Forbidden (file not created by app)
Block-->>User: Permission error
else Access app-created file
User->>Block: Select app-created file
Block->>API: Request file metadata/content
API-->>Block: Success
Block-->>User: File data returned
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (3)
-
apps/sim/blocks/blocks/google_drive.ts, line 233-244 (link)logic: File selector will show all user files, but
drive.filescope will only allow downloading files created by this app. This creates a confusing UX where users can see files but get permission errors when selecting them. -
apps/sim/blocks/blocks/google_drive.ts, line 195-206 (link)logic: Folder listing will fail for existing folders. Users can only list contents of folders created through this app with
drive.filescope. -
apps/sim/blocks/blocks/google_sheets.ts, line 44-52 (link)logic: Spreadsheet selector will fail to access existing sheets. Only sheets created by this app will be accessible with
drive.filescope.
6 files reviewed, 5 comments
| 'https://www.googleapis.com/auth/drive.readonly', | ||
| 'https://www.googleapis.com/auth/drive.file', | ||
| ], | ||
| requiredScopes: ['https://www.googleapis.com/auth/drive.file'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: drive.file scope only allows access to files created/opened by this app. Users will get permission errors when trying to download, list, or access existing Drive files they didn't create through this app.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/blocks/blocks/google_drive.ts
Line: 39:39
Comment:
**logic:** `drive.file` scope only allows access to files created/opened by this app. Users will get permission errors when trying to download, list, or access existing Drive files they didn't create through this app.
How can I resolve this? If you propose a fix, please make it concise.| 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', | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Document selector will only show docs created by this app. Existing Google Docs won't be accessible with drive.file scope.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/blocks/blocks/google_docs.ts
Line: 35:40
Comment:
**logic:** Document selector will only show docs created by this app. Existing Google Docs won't be accessible with `drive.file` scope.
How can I resolve this? If you propose a fix, please make it concise.
Summary
Removes breaking scope temporarily until we get a new one approved.
Type of Change
Checklist