{{ message }}
fix(auth): map meet service to meetings scope prefix#736
Open
jbasso-dev wants to merge 1 commit intogoogleworkspace:mainfrom
Open
fix(auth): map meet service to meetings scope prefix#736jbasso-dev wants to merge 1 commit intogoogleworkspace:mainfrom
jbasso-dev wants to merge 1 commit intogoogleworkspace:mainfrom
Conversation
Add a `"meet" => vec!["meetings"]` entry to map_service_to_scope_prefixes so `gws auth login -s meet` (alone or combined with other services) correctly identifies Meet scopes. Google exposes the Meet API under scope URLs prefixed with `meetings.*` (e.g. `meetings.space.readonly`) even though the CLI's user-facing service alias is `meet`, so the scope-picker filter matched nothing and silently dropped every Meet scope — users ended up authenticating with zero Meet permissions. The existing `augment_with_dynamic_scopes` path now picks up all Meet scopes from the Discovery document once the filter correctly classifies `meet` as unmatched, so no changes to `FULL_SCOPES` or `SCOPE_ENTRIES` are needed. Closes googleworkspace#556 Continuation of googleworkspace#565, which added only `meetings.space.created` and was auto-closed by the stale-bot before landing.
Contributor
Contributor
There was a problem hiding this comment.
Code Review
This pull request fixes an issue where the meet service alias failed to match Google Meet scopes, which use the meetings prefix. The changes map the meet service to the meetings scope prefix in the authentication logic and include unit tests to verify the fix. I have no feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
gws auth login -s meet(and multi-service filters like-s drive,gmail,calendar,sheets,docs,meet,tasks) silently requests zero Meet scopes, so subsequent calls likegws meet conferenceRecords listfail with403 insufficient authentication scopes.The cause is a naming mismatch: the CLI service alias is
meet, but Google's Meet API scopes arehttps://www.googleapis.com/auth/meetings.*.map_service_to_scope_prefixesreturned"meet"via its catch-all arm, soscope_matches_servicefiltered every Meet scope out of both the picker andfind_unmatched_services.The fix is a one-liner in the same spot that already special-cases
sheets,slides,docs, andpeople:Once the filter correctly classifies
meetas unmatched, the existingaugment_with_dynamic_scopespath picks up all three Meet scopes from the Discovery document on its own. No changes toFULL_SCOPESorSCOPE_ENTRIES— those intentionally list only the core Workspace services, not every supported API.Closes #556. Continuation of #565, which was auto-closed by the stale-bot. Credit to @anshul-garg27 for the original diagnosis; this PR is narrower (just the mapping change) and aligned with the convention set by #414.
Checklist:
AGENTS.mdguidelines (no generatedgoogle-*crates).cargo fmt --allto format the code perfectly.cargo clippy -- -D warningsand resolved all warnings. (13 pre-existing errors inmain.rsreproduce on cleanmain— out of scope.)