Skip to content

Conversation

@aadamgough
Copy link
Contributor

Summary

Added new scope needed

Type of Change

  • Bug fix

Testing

manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Nov 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Nov 24, 2025 6:31pm

@aadamgough aadamgough merged commit bf1719a into staging Nov 24, 2025
9 checks passed
@aadamgough aadamgough deleted the fix/gscope-add branch November 24, 2025 18:34
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 24, 2025

Greptile Overview

Greptile Summary

Added https://www.googleapis.com/auth/drive (full Drive access) scope to Google Drive, Docs, and Sheets integrations. This scope supplements the existing drive.file scope, which only grants access to files created by the app, by allowing access to all files in the user's Drive.

  • Updated OAuth configurations in auth.ts and oauth.ts to request both scopes during authentication
  • Modified block configurations for Google Drive, Docs, and Sheets to require both scopes
  • Added user-facing description for the new scope in the OAuth modal

This change follows the recent removal of the broken drive.readonly scope (PR #2098) and provides the necessary permissions for file selectors to browse all user files, not just app-created ones.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward and consistent across all files, adding the full Drive scope alongside the existing drive.file scope. The implementation correctly updates all necessary configuration points (OAuth providers, auth service, block definitions, and UI descriptions). The scope addition addresses a real limitation where users couldn't select existing files not created by the app.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/components/oauth-required-modal.tsx 5/5 Added user-facing description for the new full Drive access scope
apps/sim/blocks/blocks/google_docs.ts 5/5 Added full Drive scope to credential requirements for accessing all user documents
apps/sim/blocks/blocks/google_drive.ts 5/5 Added full Drive scope to all credential and selector sub-blocks for comprehensive file access
apps/sim/blocks/blocks/google_sheets.ts 5/5 Added full Drive scope to credential and spreadsheet selector for accessing all user spreadsheets
apps/sim/lib/auth.ts 5/5 Added full Drive scope to OAuth configurations for google-drive, google-docs, and google-sheets providers
apps/sim/lib/oauth/oauth.ts 5/5 Added full Drive scope to OAuth provider configurations for Drive, Docs, and Sheets integrations

Sequence Diagram

sequenceDiagram
    participant User
    participant UI as OAuth Modal
    participant Block as Google Block<br/>(Drive/Docs/Sheets)
    participant Auth as Auth Service
    participant Google as Google OAuth

    User->>Block: Configure Google integration
    Block->>Block: Check requiredScopes<br/>[drive.file, drive]
    Block->>Auth: Request OAuth with scopes
    Auth->>Google: Initiate OAuth flow<br/>with drive.file + drive scopes
    Google->>User: Request permission<br/>(Full Drive access)
    User->>Google: Grant permissions
    Google->>Auth: Return access token<br/>with granted scopes
    Auth->>Block: Provide authenticated credential
    Block->>User: Ready to access all Drive files
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants