fix(google-scopes): removed unnecessary google scopes#849
fix(google-scopes): removed unnecessary google scopes#849waleedlatif1 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Greptile Summary
This PR removes OAuth scopes from Google Sheets and Gmail integrations across multiple files. The changes eliminate the https://www.googleapis.com/auth/spreadsheets scope from Google Sheets tools (read, write, update, append) and the https://www.googleapis.com/auth/gmail.compose scope from Gmail draft functionality. The modifications span tool configurations, block definitions, OAuth provider settings, and UI components.
The changes centralize scope management by relying on base provider scopes defined in oauth.ts and auth.ts rather than having individual tools specify additional scopes. For Google Sheets, the integration now depends solely on the https://www.googleapis.com/auth/drive.file scope, while Gmail operations rely on existing base scopes like gmail.send and gmail.modify. The PR also removes corresponding scope descriptions from the OAuth required modal to maintain UI consistency.
This refactoring follows the principle of least privilege by requesting fewer permissions during OAuth flows, potentially improving user trust and reducing the need for extensive Google API verification processes.
Confidence score: 2/5
- This PR introduces significant risk of breaking Google Sheets functionality for existing user workflows
- Score reflects a fundamental misunderstanding of Google OAuth scope limitations and potential production impact
- Critical attention needed on OAuth configuration files and all Google Sheets integration points
9 files reviewed, 1 comment
apps/sim/lib/oauth/oauth.ts
Outdated
| scopes: [ | ||
| 'https://www.googleapis.com/auth/spreadsheets', | ||
| 'https://www.googleapis.com/auth/drive.file', | ||
| ], |
There was a problem hiding this comment.
logic: Using only drive.file scope limits access to spreadsheets created by the app or explicitly selected by users via Google Picker. For existing spreadsheets, users would need to explicitly grant access through file sharing or selection UI.
* removed unnecessary google scopes * bun run lint #849 --------- Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
* removed unnecessary google scopes * bun run lint #849 --------- Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
* removed unnecessary google scopes * bun run lint simstudioai#849 --------- Co-authored-by: Adam Gough <adamgough@Mac.attlocal.net>
Summary
Removes unnecessary scopes
Fixes #(issue)
Type of Change
Testing
Logged in and logged out multiple times for both gmail and google sheets. Confirmed that all operations were working for each tool.
Checklist