Summary
On v0.22.5, gws auth login -s chat does not include any Google Chat OAuth scope in the consent request or the saved credentials. This is a regression of #236, which was fixed in 0.10.0 by the dynamic Discovery-scope fallback (PR #352 / #246, commit 06aa698).
A service that is in the static scope list (e.g. drive) resolves correctly, so the failure is isolated to services that depend on the dynamic fallback path.
Environment
- gws version: 0.22.5 (latest)
- OS: macOS
- Account: personal @gmail.com (also reproduced on a Google Workspace account)
- Chat API enabled in the GCP project
- OAuth client: Desktop app
Steps to reproduce
GOOGLE_WORKSPACE_CLI_LOG=gws=debug gws auth login -s chat
- Complete the browser consent.
- Inspect the consent URL
scope= param and the saved scopes.
Actual behavior (-s chat)
No Chat scope — only cloud-platform + identity scopes:
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"openid",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile"
]
Control: -s drive (service in the static list) works
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/cloud-platform",
"openid",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile"
]
Same version, same account, same flow — only the service name differs. drive (static list) resolves; chat (dynamic fallback) does not.
Expected behavior
-s chat should add a Chat scope (e.g. https://www.googleapis.com/auth/chat.messages), as intended by #236 / #352.
Related observations (Chat scope is unreachable via every normal path)
On v0.22.5, no standard path yields a Chat scope:
gws auth login -s chat → no Chat scope (the regression above)
gws auth login (no -s) → no Chat scope
- interactive scope picker → Chat is not listed as a selectable option
The only working path is passing the full scope URL explicitly:
gws auth login --scopes "https://www.googleapis.com/auth/chat.messages"
This succeeds and yields correct Chat access.
I'm reporting -s chat as the core bug because it's a clear regression of #236. Whether the no-flag default and the picker are supposed to include Chat may be a separate design question, but in practice all paths currently fail, leaving the explicit --scopes URL as the only way to obtain Chat access.
Note on debug logging
With GOOGLE_WORKSPACE_CLI_LOG=gws=debug, no Discovery-fetch log lines are emitted during auth login, so I could not confirm from logs whether the fallback runs and returns empty, or is never invoked. Either way, no Chat scope is produced.
Summary
On v0.22.5,
gws auth login -s chatdoes not include any Google Chat OAuth scope in the consent request or the saved credentials. This is a regression of #236, which was fixed in 0.10.0 by the dynamic Discovery-scope fallback (PR #352 / #246, commit 06aa698).A service that is in the static scope list (e.g.
drive) resolves correctly, so the failure is isolated to services that depend on the dynamic fallback path.Environment
Steps to reproduce
GOOGLE_WORKSPACE_CLI_LOG=gws=debug gws auth login -s chatscope=param and the savedscopes.Actual behavior (
-s chat)No Chat scope — only
cloud-platform+ identity scopes:Control:
-s drive(service in the static list) worksSame version, same account, same flow — only the service name differs.
drive(static list) resolves;chat(dynamic fallback) does not.Expected behavior
-s chatshould add a Chat scope (e.g.https://www.googleapis.com/auth/chat.messages), as intended by #236 / #352.Related observations (Chat scope is unreachable via every normal path)
On v0.22.5, no standard path yields a Chat scope:
gws auth login -s chat→ no Chat scope (the regression above)gws auth login(no-s) → no Chat scopeThe only working path is passing the full scope URL explicitly:
This succeeds and yields correct Chat access.
I'm reporting
-s chatas the core bug because it's a clear regression of #236. Whether the no-flag default and the picker are supposed to include Chat may be a separate design question, but in practice all paths currently fail, leaving the explicit--scopesURL as the only way to obtain Chat access.Note on debug logging
With
GOOGLE_WORKSPACE_CLI_LOG=gws=debug, no Discovery-fetch log lines are emitted duringauth login, so I could not confirm from logs whether the fallback runs and returns empty, or is never invoked. Either way, no Chat scope is produced.