Skip to content

fix(auth): store the pasted client_secret.json fields, not the document - #974

Open
YauheniPo wants to merge 1 commit into
googleworkspace:mainfrom
YauheniPo:fix/auth-setup-pasted-client-json
Open

YauheniPo wants to merge 1 commit into
googleworkspace:mainfrom
YauheniPo:fix/auth-setup-pasted-client-json

Conversation

@YauheniPo

Copy link
Copy Markdown

The Console hands the OAuth client over as a downloadable document, so users paste it into the gws auth setup prompts. save_client_config stored those strings verbatim, producing a client_secret.json whose client_id and client_secret each contained the whole document; every later login then failed with 401 invalid_client.

Extract the pair when the value parses as a Console document (installed or web scope) and keep plain values exactly as given. Reported in #947.

Description

Please include a summary of the change and which issue is fixed. If adding a new feature or command, please include the output of running it with --dry-run to prove the JSON request body matches the Discovery Document schema.

Dry Run Output:

// Paste --dry-run output here if applicable

Checklist:

  • My code follows the AGENTS.md guidelines (no generated google-* crates).
  • I have run cargo fmt --all to format the code perfectly.
  • I have run cargo clippy -- -D warnings and resolved all warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have provided a Changeset file (e.g. via pnpx changeset) to document my changes.

The Console hands the OAuth client over as a downloadable document, so users
paste it into the `gws auth setup` prompts. save_client_config stored those
strings verbatim, producing a client_secret.json whose client_id and
client_secret each contained the whole document; every later login then failed
with `401 invalid_client`.

Extract the pair when the value parses as a Console document (installed or web
scope) and keep plain values exactly as given. Reported in googleworkspace#947.
@changeset-bot

changeset-bot Bot commented Nov 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d316dae

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@googleworkspace/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant