Skip to content

fix(auth): add gmail readonly scope and fix drive readonly accumulation#113

Merged
steipete merged 4 commits intoopenclaw:mainfrom
salmonumbrella:fix/issue-111-drive-scope-readonly
Mar 3, 2026
Merged

fix(auth): add gmail readonly scope and fix drive readonly accumulation#113
steipete merged 4 commits intoopenclaw:mainfrom
salmonumbrella:fix/issue-111-drive-scope-readonly

Conversation

@salmonumbrella
Copy link
Copy Markdown
Contributor

Summary

Root Cause (Issue #111)

Google's OAuth include_granted_scopes=true parameter was causing previously granted scopes to be merged into new tokens, defeating the purpose of requesting restricted scopes like drive.readonly.

Test Plan

  • Added test for --gmail-scope=readonly verifying correct scopes
  • Added test for --drive-scope=readonly verifying DisableIncludeGrantedScopes is set
  • Added test for gmail read alias
  • All existing tests pass
  • Linting passes

Fixes #110
Fixes #111

🤖 Generated with Claude Code

itsjeremyjohnson added a commit to Robben-Media/gogcli that referenced this pull request Feb 16, 2026
- fix: Go version in go.mod (PR openclaw#158)
- fix(secrets): allow empty GOG_KEYRING_PASSWORD to skip prompt (PR openclaw#153)
- fix(auth): add gmail readonly scope and fix drive readonly accumulation (PR openclaw#113)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
cchiles added a commit to cchiles/gogcli that referenced this pull request Feb 16, 2026
@visionik
Copy link
Copy Markdown
Collaborator

visionik commented Mar 2, 2026

Apologies this took a while to get to. Can you rebase off of current main and resubmit the PR?

I'm up for merging if you can do that and everything passes CI tests.

Thank you!

@salmonumbrella salmonumbrella force-pushed the fix/issue-111-drive-scope-readonly branch from 928ab5a to 7cf94cf Compare March 3, 2026 02:42
@salmonumbrella
Copy link
Copy Markdown
Contributor Author

salmonumbrella commented Mar 3, 2026

@visionik Rebased on main and all CI checks are green.

@steipete steipete force-pushed the fix/issue-111-drive-scope-readonly branch from 7cf94cf to 8e0a609 Compare March 3, 2026 03:58
@steipete steipete merged commit 0041b1f into openclaw:main Mar 3, 2026
1 check passed
@steipete
Copy link
Copy Markdown
Collaborator

steipete commented Mar 3, 2026

Landed via temp rebase onto main.

  • Gate: make ci (fails on existing lint baseline), go test ./..., go test ./internal/cmd -run 'TestAuthAddCmd_(GmailScopeReadonly|DriveScopeReadonly|ReadonlyScopes|DriveScopeFile|ReadonlyWithDriveScopeFileRejected)$', go test ./internal/googleauth -run 'Test(AuthURLParams|ScopesForManageWithOptions_GmailScopeReadonly)$'
  • Land commit: 0041b1f
  • Merge commit: 0041b1f

Thanks @salmonumbrella!

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.

bug(drive): --drive-scope=readonly still grants full read-write access feat(gmail): Add --gmail-scope=readonly option for gmail.readonly scope

3 participants