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
{{ message }}
Repository navigation
auth setup: pasted OAuth Client ID is not trimmed — trailing whitespace causes 401 invalid_client at login #882
Run the interactive wizard: gws auth setup --project <project-id>
At Step 5/5 ("OAuth credentials — Waiting for manual input..."), paste a Client ID that ends with a trailing space (very easy to pick up when copying from the Cloud Console credentials page or a chat/notes app)
Complete the wizard and let it start gws auth login
What happens
The wizard stores the Client ID verbatim (trailing space included) in ~/.config/gws/client_secret.json:
Google rejects the request with "The OAuth client was not found." / Error 401: invalid_client, which is quite hard to trace back to an invisible character — the pasted value looks correct in the terminal, and gws auth setup reports success.
Follow-up runs of the wizard pre-fill the stored (dirty) value, so the error persists across re-runs and survives what otherwise looks like a clean re-setup.
Expected behavior
Trim leading/trailing whitespace from the pasted Client ID and Client Secret in the setup wizard input handling (stage_configure_oauth), and ideally also when loading values from client_secret.json / env vars, so a stray space can never produce a misleading invalid_client error.
Workaround
Manually edit ~/.config/gws/client_secret.json and remove the trailing space from client_id, then re-run gws auth login.
Activity
fix(auth): trim OAuth Client ID/Secret on input and load (upstream go…