diff --git a/.changeset/fix-auth-people-meet-scopes.md b/.changeset/fix-auth-people-meet-scopes.md new file mode 100644 index 00000000..f8eda2dd --- /dev/null +++ b/.changeset/fix-auth-people-meet-scopes.md @@ -0,0 +1,5 @@ +--- +"@googleworkspace/cli": patch +--- + +Add People and Meet scopes to auth login picker and full preset diff --git a/src/auth_commands.rs b/src/auth_commands.rs index 6d0ffb7d..d715c318 100644 --- a/src/auth_commands.rs +++ b/src/auth_commands.rs @@ -76,6 +76,8 @@ pub const FULL_SCOPES: &[&str] = &[ "https://www.googleapis.com/auth/documents", "https://www.googleapis.com/auth/presentations", "https://www.googleapis.com/auth/tasks", + "https://www.googleapis.com/auth/contacts", + "https://www.googleapis.com/auth/meetings.space.created", "https://www.googleapis.com/auth/pubsub", "https://www.googleapis.com/auth/cloud-platform", ]; @@ -571,6 +573,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], } } @@ -1292,6 +1295,14 @@ const SCOPE_ENTRIES: &[ScopeEntry] = &[ scope: "https://www.googleapis.com/auth/tasks", label: "Google Tasks", }, + ScopeEntry { + scope: "https://www.googleapis.com/auth/contacts", + label: "Google Contacts (People API)", + }, + ScopeEntry { + scope: "https://www.googleapis.com/auth/meetings.space.created", + label: "Google Meet", + }, ScopeEntry { scope: "https://www.googleapis.com/auth/pubsub", label: "Cloud Pub/Sub", @@ -1965,6 +1976,19 @@ mod tests { )); } + #[test] + fn scope_matches_service_meet_meetings() { + let services: HashSet = ["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 + )); + } + #[test] fn scope_matches_service_chat() { let services: HashSet = ["chat"].iter().map(|s| s.to_string()).collect();