Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/auth-meet-scopes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@googleworkspace/cli": patch
---

Fix `gws auth login -s meet` not granting any Meet scopes. The Meet API exposes scopes under the `meetings.*` prefix (e.g. `meetings.space.readonly`), but the CLI's service alias is `meet`, so the scope-picker filter matched nothing and silently dropped every Meet scope. Map the `meet` service to the `meetings` scope prefix so the existing dynamic-augmentation path pulls all Meet scopes from the Discovery document when `-s meet` is supplied.
18 changes: 18 additions & 0 deletions crates/google-workspace-cli/src/auth_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,7 @@ fn map_service_to_scope_prefixes(service: &str) -> Vec<&str> {
"slides" => vec!["presentations"],
"docs" => vec!["documents"],
"people" => vec!["contacts", "directory"],
"meet" => vec!["meetings"],
s => vec![s],
}
}
Expand Down Expand Up @@ -2236,6 +2237,23 @@ mod tests {
));
}

#[test]
fn scope_matches_service_meet() {
let services: HashSet<String> = ["meet"].iter().map(|s| s.to_string()).collect();
assert!(scope_matches_service(
"https://www.googleapis.com/auth/meetings.space.created",
&services
));
assert!(scope_matches_service(
"https://www.googleapis.com/auth/meetings.space.readonly",
&services
));
assert!(scope_matches_service(
"https://www.googleapis.com/auth/meetings.space.settings",
&services
));
}

// ── services filter integration tests ────────────────────────────────

#[test]
Expand Down
Loading