Skip to content

Conversation

boufaied
Copy link

@boufaied boufaied commented Oct 8, 2025

Problem:

Since Google requires specific validation process for drive.readonly scope, and the drive.readonly scope lets the app access sensitive user data, applications using this scope now require extensive verification processes including CASA Tier 2/3 security assessments.

Solution:

This patch addresses two key issues:

Default Scope Change: Changes the default scope from drive.readonly (restricted) to drive.file (non-sensitive) to avoid Google's verification requirements. The drive.file scope doesn't require app verification from Google and provides per-file access, which is more secure and user-friendly.

Scope Logic Improvement: Implements proper logic where custom scopes completely replace default scopes when provided, rather than merging them. This prevents unnecessary scope escalation and gives users full control over permissions.

Benefits:

No Verification Required: drive.file is classified as "non-sensitive" and doesn't require Google's security assessment

Better User Experience: Users can select specific files they want to share with the app through the file picker

Improved Security: Follows Google's recommended practice of using the most narrowly focused scope possible

Cleaner Scope Management: When custom scopes are provided, they are used exclusively without default scope pollution

Related Issues:

References:

Google Drive API Scopes Documentation

Google's Scope Verification Requirements

This change ensures the library works out-of-the-box without requiring developers to go through Google's complex verification process, while still allowing advanced users to specify restricted scopes if needed for their specific use cases.

- Change default scope from drive.readonly to drive.file to avoid Google verification requirements
- Fix custom scope logic to prevent merging with default scopes
- Resolves issues Jose-cd#25, Jose-cd#70 and Jose-cd#79
@boufaied boufaied changed the title Replace drive.readonly with drive.file as default scope Replace drive.readonly with drive.file as default scope to avoid Google verification requirements Oct 8, 2025
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.

1 participant