Skip to content

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

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

steipete merged 4 commits into
openclaw: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 referenced this pull request in Robben-Media/gogcli Feb 16, 2026
- fix: Go version in go.mod (PR #158)
- fix(secrets): allow empty GOG_KEYRING_PASSWORD to skip prompt (PR #153)
- fix(auth): add gmail readonly scope and fix drive readonly accumulation (PR #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

visionik commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

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

salmonumbrella commented Mar 3, 2026 •

Copy link
Copy Markdown
Contributor Author

@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

steipete commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator

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