-
Notifications
You must be signed in to change notification settings - Fork 314
Description
Environment
- gws version: 0.3.4
- OS: macOS Apple Silicon
- Account: personal @gmail.com
- Installed via: npm install -g @googleworkspace/cli
Bug 1: 401 on all commands despite successful auth
After completing gws auth login successfully, every command returns 401.
Steps to reproduce:
gws auth setup→ successgws auth login→ browser opens, I approve, shows "Authentication successful. Encrypted credentials saved."gws auth status→ showstoken_valid: true,encrypted_credentials_exists: true,encryption_valid: truegws drive files list→ 401 "Access denied. No credentials provided"
Tried all workarounds:
GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=...credentials.enc gws drive files list→ still 401GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=...credentials.json gws drive files list→ still 401gws auth login && gws drive files list→ still 401- Re-authenticating multiple times → same result every time
Bug 2: auth export outputs truncated/masked credentials
gws auth export outputs masked values instead of real credentials:
{
"client_id": "236618686201-xxx.apps.googleusercontent.com",
"client_secret": "GOCS...jDDh",
"refresh_token": "1//0...V2a0",
"type": "authorized_user"
}When saved via gws auth export > credentials.json, the file contains these truncated values making it completely unusable as a credentials file.
Auth status output
{
"encrypted_credentials_exists": true,
"encryption_valid": true,
"has_refresh_token": true,
"plain_credentials_exists": true,
"token_valid": true,
"storage": "encrypted"
}Workaround
Had to bypass the CLI entirely and do a manual OAuth flow via curl to get a working access token. The underlying Google APIs work fine — the CLI credential reading is broken.
Related
- May be related to
gws auth loginunusable with personal @gmail.com accounts — invalid_scope + ignores custom client_secret.json #119 (different root cause) - May be related to fix: use ~/.config/gws on all platforms for consistent config path #134 (config path inconsistency)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels