You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gws version: 0.22.5 (installed via npm on Windows 10)
Steps to reproduce:
Run gws auth setup
Complete gcloud auth login when prompted
Choose "Create new project"
Let the wizard finish (creates OAuth client, writes ~/.config/gws/client_secret.json)
Run gws auth login
Actual behavior:
The generated client_secret.json has its client_id and client_secret fields filled with the entire JSON credentials object (double-serialized as a string) instead of the plain values:
This causes every subsequent gws auth login attempt to fail with:
error[auth]: OAuth flow failed: Server error: invalid_client: The OAuth client was not found.
The printed "Open this URL in your browser to authenticate" link also contains the malformed client_id query param, so manually fixing the URL alone does not help until the underlying file is fixed.
Workaround:
Manually edit client_secret.json and replace client_id/client_secret with the actual plain values extracted from the nested string, then gws auth login works correctly.
Expected behavior: gws auth setup should write the plain client_id/client_secret strings, not a re-serialized copy of the whole credentials object.
save_client_config stored the pasted strings verbatim, so when the Cloud
Console document went into the gws auth setup prompts, both client_id and client_secret ended up holding the whole JSON document and every later login
failed with 401 invalid_client.
The PR parses the value first: if it is an installed or web document, the client_id / client_secret pair is extracted from it; anything else is
stored exactly as typed, so existing setups are unaffected. Covered by unit
tests for both document shapes and both plain-value paths.
For anyone hitting this today: deleting client_secret.json and running gws auth setup again works around it until the fix ships.
Activity
fix(auth): store the pasted client_secret.json fields, not the document
YauheniPo commentedon Oct 26, 2026
Fixed in #967.
save_client_configstored the pasted strings verbatim, so when the CloudConsole document went into the
gws auth setupprompts, bothclient_idandclient_secretended up holding the whole JSON document and every later loginfailed with
401 invalid_client.The PR parses the value first: if it is an
installedorwebdocument, theclient_id/client_secretpair is extracted from it; anything else isstored exactly as typed, so existing setups are unaffected. Covered by unit
tests for both document shapes and both plain-value paths.
For anyone hitting this today: deleting
client_secret.jsonand runninggws auth setupagain works around it until the fix ships.fix(auth): store the pasted client_secret.json fields, not the document