-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Summary
gws auth login fails with Error 400: invalid_request — "Required parameter is missing: response_type" when using a manually configured Desktop OAuth client on v0.4.1. The OAuth URL generated by the CLI appears to be missing the response_type=code parameter.
Environment
- gws version: 0.4.1 (npm)
- OS: macOS 26.4, Apple Silicon (arm64)
- Node: v20.19.0
- Account type: Google Workspace (custom domain)
- OAuth client type: Desktop app (created in Google Cloud Console)
Steps to Reproduce
- Create a Desktop OAuth client in Google Cloud Console
- Download
client_secret_*.json, rename toclient_secret.json - Place at
~/Library/Application Support/gws/client_secret.json - Run
gws auth login --account user@example.com - Browser opens → Google shows "Access blocked: Authorization Error"
Error
Access blocked: Authorization Error
Required parameter is missing: response_type
Error 400: invalid_request
What I verified
- The
client_secret.jsonhas the correct"installed"wrapper structure withclient_id,client_secret,auth_uri,token_uri, andredirect_uris - OAuth client type is "Desktop" (confirmed in Cloud Console)
- OAuth consent screen is configured with appropriate scopes (Drive, Gmail, Calendar, Sheets, Docs, Slides)
- Test users are added
Likely cause
The CLI is constructing an OAuth authorization URL without including response_type=code as a query parameter. This is required by Google's OAuth 2.0 endpoint.
Related issues
gws auth loginunusable with personal @gmail.com accounts — invalid_scope + ignores custom client_secret.json #119 — CLI ignores customclient_secret.jsonand uses hardcoded client ID (v0.3.4). May be the same root cause — if the CLI is still using its built-in client rather than the user-provided file, the built-in client config may be malformed.- credentials saved successfully but 401 on all commands + auth export outputs truncated values - macOS Apple Silicon #137 — Credentials saved successfully but 401 on all commands (macOS Apple Silicon)
- gws auth login fails for personal Gmail accounts: -s flag does not limit OAuth scopes #138 —
-sflag does not limit OAuth scopes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels