Skip to content

feat(google): unify Google Workspace setup into one sign-in#200

Merged
daltoniam merged 4 commits into
mainfrom
feat/google-workspace-unified-setup
Jul 9, 2026
Merged

feat(google): unify Google Workspace setup into one sign-in#200
daltoniam merged 4 commits into
mainfrom
feat/google-workspace-unified-setup

Conversation

@daltoniam

Copy link
Copy Markdown
Owner

Summary

  • Consolidates the 11 separate Google integration setups (Gmail, Calendar, Drive, Docs, Sheets, Slides, Forms, Tasks, Chat, Contacts, Meet) into a single Google Workspace setup page: enter one OAuth client, pick services, complete one Google consent, and the token is fanned out to every selected service.
  • Bring-your-own OAuth client model so self-hosted users avoid Google verification/CASA; requests incremental scopes (include_granted_scopes=true) so enabling more services later preserves existing grants, and partial consent enables only the services actually granted.

What changed

  • New googleoauth/family.go as the single source of truth for per-service scopes plus the group OAuth start/callback/poll flow; the 11 adapters now pull scopes from it.
  • Config env fan-out: GOOGLE_OAUTH_CLIENT_ID / GOOGLE_OAUTH_CLIENT_SECRET populate all Google services.
  • New unified web page + handlers at /integrations/google/setup; integrations index shows a collapsed Google Workspace group card; the 11 per-service pages keep working but link to the unified page.
  • Docs: new docs/google-setup.md (GCP walkthrough, 7-day Testing refresh caveat, scope table, token fan-out), updated docs/web-ui.md and the AGENTS.md reference table.

Testing

  • make ci passes (build, vet, race tests, lint, gosec 0 issues, govulncheck clean).

💘 Generated with Crush

daltoniam and others added 3 commits July 7, 2026 17:13
Replace the eleven separate Google integration setups (Gmail, Calendar,
Drive, Docs, Sheets, Slides, Forms, Tasks, Chat, Contacts, Meet) with a
single Google Workspace page: enter one OAuth client, pick services, and
complete one Google consent. The resulting token is fanned out to every
selected service so each adapter refreshes independently.

Uses a bring-your-own OAuth client model so self-hosted users avoid
Google verification, and requests incremental scopes so enabling more
services later preserves existing grants. Partial consent enables only
the services whose scopes were actually granted.

Co-Authored-By: Crush <noreply@anthropic.com>
A connected service could show "Invalid token" even when the token was
perfectly valid, because its Google API was simply not enabled in the
user's Cloud project. The setup page now validates the shared token once
and shows an actionable "Enable API" hint with guidance instead of a
misleading error, and the header progress now counts only services that
actually pass their health check.

Co-Authored-By: Crush <noreply@anthropic.com>
Call out the most common first-run confusion: approving the consent
screen grants scopes but does not enable the underlying APIs, which
surfaces as a yellow "Enable API" badge. Add matching troubleshooting
guidance.

Co-Authored-By: Crush <noreply@anthropic.com>

@acmacalister acmacalister left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Clean PR: CI green, tests cover the unified flow + config fan-out, googleoauth package is well-isolated, no security or architecture concerns. The BYO-client + partial-consent design is the right call for self-hosted users.

@acmacalister

Copy link
Copy Markdown
Collaborator

CI/status checks: all green (build ✓, test ✓, lint ✓, security ✓, rust-sdk ✓).

Clean PR — the unified Google Workspace flow is well-structured with the single source of truth in googleoauth/family.go, proper token fan-out, and the TokenValid probe to distinguish disabled APIs from invalid tokens. No blocking issues found. LGTM.

Add handler tests for the Google Workspace setup page, credential
save fan-out, OAuth start guards, and callback error path — closing
the test-coverage gap for the new unified setup flow.

Co-Authored-By: Claude <noreply@anthropic.com>
@acmacalister

Copy link
Copy Markdown
Collaborator

CI status checks all passed (build ✓, test ✓, lint ✓, security ✓, rust-sdk ✓). Clean PR — no blocking issues found. LGTM. (Approval blocked by GitHub's same-account restriction.)

@daltoniam daltoniam merged commit 78898a7 into main Jul 9, 2026
5 checks passed
@daltoniam daltoniam deleted the feat/google-workspace-unified-setup branch July 9, 2026 22:53
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.

2 participants