Environment
- gws version: 0.4.4
- OS: Linux (Arch Linux x64)
- Installed via: npm @googleworkspace/cli
Steps to Reproduce
- Run
gws auth login --account user@gmail.com
- Complete OAuth flow — success message confirms credentials saved to
credentials.<base64-email>.enc
- Verify:
gws auth list shows account as default
- Run any API call:
gws gmail users messages list --params '{"userId": "me"}'
Expected
API call succeeds.
Actual
{"error": {"code": 401, "message": "Access denied. No credentials provided."}}
Root Cause
gws auth login --account saves tokens to credentials.<base64-email>.enc but gws auth status and all API calls look for credentials.enc (generic path). The account-specific file is never discovered.
gws auth status shows:
- encrypted_credentials: credentials.enc (generic)
- encrypted_credentials_exists: false
- token_valid: false
...even though credentials.<base64-email>.enc exists with 334 bytes of content.
Also: gws auth export --account user@gmail.com returns 'No encrypted credentials found' despite the file existing.
Setting GOOGLE_WORKSPACE_CLI_ACCOUNT env var or pointing GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE directly at the .enc file both fail to resolve the issue.