Skip to content

docs(auth): add manual OAuth client and browser consent guidance#29

Merged
jpoehnelt merged 2 commits intogoogleworkspace:mainfrom
jpoehnelt-bot:docs/oauth-client-guidance
Mar 4, 2026
Merged

docs(auth): add manual OAuth client and browser consent guidance#29
jpoehnelt merged 2 commits intogoogleworkspace:mainfrom
jpoehnelt-bot:docs/oauth-client-guidance

Conversation

@jpoehnelt-bot
Copy link
Copy Markdown
Contributor

Summary

Adds explicit docs for cases where users/agents need to manually configure OAuth in Google Cloud Console.

Included

  • Manual OAuth setup steps in GCP (branding/audience/client creation)
  • Exact location for client_secret.json (~/.config/gws/client_secret.json)
  • Browser-assisted auth guidance for humans and agents
  • Notes for common consent blockers:
    • "Google hasn't verified this app" in testing mode
    • scope checkbox prompts requiring explicit selection

Also includes a patch changeset.

Fixes #24
Fixes #25

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the project's authentication documentation by providing detailed instructions for manual OAuth client setup in Google Cloud Console and clarifying browser-assisted authentication processes. The changes aim to improve user experience by addressing common configuration challenges and consent issues, ensuring smoother integration for users requiring explicit control over their OAuth setup.

Highlights

  • Manual OAuth Setup Guidance: Added explicit, step-by-step documentation for configuring OAuth clients manually within the Google Cloud Console, including branding, audience, and client creation.
  • Client Secret Location: Specified the exact required location for the client_secret.json file (~/.config/gws/client_secret.json).
  • Browser-Assisted Authentication: Provided guidance for both human and agent-assisted browser authentication flows.
  • Common Consent Blockers: Included notes and solutions for common issues encountered during OAuth consent, such as the 'Google hasn't verified this app' warning and explicit scope selection prompts.
Changelog
  • .changeset/461e1845e9c8.md
    • Added a new changeset entry detailing the addition of manual Google Cloud OAuth client setup and browser-assisted login guidance.
  • README.md
    • Added a new section titled 'Manual OAuth setup (Google Cloud Console)' with instructions for creating an OAuth client.
    • Added a new section titled 'Browser-assisted auth (human or agent)' explaining how to complete OAuth and handle common consent prompts.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds valuable documentation for users who need to manually configure their OAuth client in Google Cloud Console. The new sections in the README provide clear, step-by-step instructions for creating an OAuth client and handling the browser-based authentication flow. I've suggested a small improvement to the URLs in the documentation to make them more direct and robust.

Note: Security Review has been skipped due to the limited scope of the PR.

…tials

Update the OAuth setup section to use the canonical, stable Cloud Console
URLs as suggested in Gemini review (PR googleworkspace#29):
- /auth/overview → /apis/credentials/consent (matches the actual page title)
- /auth/clients  → /apis/credentials (more direct, avoids redirect)
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 4, 2026

🦋 Changeset detected

Latest commit: 806b8e7

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

@jpoehnelt-bot
Copy link
Copy Markdown
Contributor Author

🤖 Bot triage update

Fixed in commit 806b8e7

Addressed Gemini review comment (README.md:107):

Updated the OAuth setup section URLs to use canonical, stable Cloud Console paths as suggested:

Before After
/auth/overview?project=... /apis/credentials/consent?project=...
/auth/clients?project=... /apis/credentials?project=...

Labels updated to match actual Cloud Console page titles: "OAuth consent screen" and "Credentials".

CI status: All checks pass ✅ except API Smoketest ❌ — this fails because GOOGLE_CREDENTIALS_JSON secret is not available for fork PRs (infrastructure issue, not a code problem — requires maintainer to configure secret access for this workflow).

@jpoehnelt-bot
Copy link
Copy Markdown
Contributor Author

Review comments addressed ✅

The Gemini code review suggestion was applied in commit 806b8e7.

Changes made:

  • Updated Cloud Console URLs to canonical paths — Replaced the redirect-based /auth/overview and /auth/clients paths with the canonical /apis/credentials/consent and /apis/credentials URLs. Labels also updated to match the actual page titles in Cloud Console:
    • OAuth consent screen: https://console.cloud.google.com/apis/credentials/consent?project=<PROJECT_ID>
    • Credentials: https://console.cloud.google.com/apis/credentials?project=<PROJECT_ID>

Quality checks:

  • cargo fmt --all -- --check: clean (docs-only change, no Rust compilation)
  • ✅ No new clippy issues introduced (no Rust code changed)

@jpoehnelt-bot
Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Member

@jpoehnelt jpoehnelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation-only PR — clear and well-structured.

A few suggestions:

  1. "Agent-assisted flow" section — the instructions are practical, but the phrase "the agent opens the URL, selects account, handles consent prompts" is fairly high-level. Consider linking to or referencing the AGENTS.md file, which already describes the security model, so readers understand the trust boundary.

  2. ~/.config/gws/client_secret.json path — this is hardcoded in the README but the actual config dir is computed at runtime via config_dir(). On non-XDG platforms (macOS with APPDATA not set, Windows) the path may differ. A note that gws auth status prints the active config directory would help users confirm the right location.

  3. "Testing mode" phrasing — "testing mode" in the OAuth consent screen refers specifically to the Google OAuth app publish state, not to any gws-internal test mode. Adding a parenthetical "(Google OAuth app publish state)" would reduce confusion.

  4. Changeset — patch-level changeset is appropriate for a docs-only change.

LGTM — fills a real gap in the getting-started experience.

@jpoehnelt-bot
Copy link
Copy Markdown
Contributor Author

Follow-up on Gemini URL guidance:\n\n- README now uses canonical Cloud Console URLs for consent and credentials pages (no redirect-dependent links).\n- Resolving the remaining thread as addressed.

@jpoehnelt jpoehnelt merged commit f281797 into googleworkspace:main Mar 4, 2026
21 checks passed
jpoehnelt-bot added a commit to jpoehnelt-bot/cli that referenced this pull request Mar 4, 2026
…tials

Update the OAuth setup section to use the canonical, stable Cloud Console
URLs as suggested in Gemini review (PR googleworkspace#29):
- /auth/overview → /apis/credentials/consent (matches the actual page title)
- /auth/clients  → /apis/credentials (more direct, avoids redirect)
shigechika pushed a commit to shigechika/gws-cli that referenced this pull request Mar 20, 2026
…gleworkspace#29)

* docs(auth): add manual OAuth client/browser guidance

* docs(auth): use canonical Cloud Console URLs for OAuth consent/credentials

Update the OAuth setup section to use the canonical, stable Cloud Console
URLs as suggested in Gemini review (PR googleworkspace#29):
- /auth/overview → /apis/credentials/consent (matches the actual page title)
- /auth/clients  → /apis/credentials (more direct, avoids redirect)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants