Skip to content

gws auth login: 'Required parameter is missing: response_type' with Desktop OAuth client on v0.4.1 #150

@jaseemts

Description

@jaseemts

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

  1. Create a Desktop OAuth client in Google Cloud Console
  2. Download client_secret_*.json, rename to client_secret.json
  3. Place at ~/Library/Application Support/gws/client_secret.json
  4. Run gws auth login --account user@example.com
  5. 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.json has the correct "installed" wrapper structure with client_id, client_secret, auth_uri, token_uri, and redirect_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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions