Skip to content

fix(extension): google token paste alongside browser OAuth (Claude-style) - #408

Merged
Rchari1 merged 1 commit into
mainfrom
fix/google-token-via-token
Aug 17, 2026
Merged

fix(extension): google token paste alongside browser OAuth (Claude-style)#408
Rchari1 merged 1 commit into
mainfrom
fix/google-token-via-token

Conversation

@Rchari1

@Rchari1 Rchari1 commented Aug 17, 2026

Copy link
Copy Markdown
Member

Fixes the reported 'google connectors don't work' — now supports paste-a-token the same way Claude and other AI connectors do.

What changed

  • fix: google token auth like Claude + revert dock blank + restart opencode#210 (companion — already pushed): Google connectors advertise [token,browser] for google/google-drive, not browser-only. probeGoogle/probeGoogleDrive already validate pasted tokens via POST /amicode/connections/credential; the UI (connections.ts, connection-picker.tsx) now offers token input + browser button for Google, same as Slack/GitHub. Validated via probeGoogle (tokeninfo) and probeGoogleDrive (drive/v3/about).

  • This repo: server_manager.ts logs the dual support so diagnostics don't mislead — the extension host already proxies connections-credential via chat_bridge to the local server, no proxy change needed.

Verification

  • Picker for Google shows 'Paste Google token (or use browser below)' + 'Sign in with browser'.
  • Card for Google shows Token/Browser chooser when unconfigured; token paste hits /amicode/connections/credentialprobeGoogle.
  • Browser flow still works (BROWSER env logged, real Google OAuth URL).

Fixes #335 follow-up

Summary by CodeRabbit

  • New Features
    • Added support messaging for pasting Google connector tokens during setup, alongside browser-based OAuth.

Google connectors now accept a pasted token the same way Claude and other
connectors do (Slack/GitHub flow via POST /amicode/connections/credential),
in addition to the browser OAuth path. The extension already proxies that
route via chat_bridge (connections-credential) and the opencode server
validates via probeGoogle/probeGoogleDrive, so no extension logic change
was needed — this logs the dual support explicitly so a future 'browser
doesn't launch' is not the only diagnostic.

Server side (harmoniqs/opencode#210) advertises [token,browser] for
google/google-drive, makes the UI offer token input + browser button in
the picker and card chooser, and validates pasted tokens via
POST /amicode/connections/credential -> probeGoogle.

Related to #335
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 14386a3b-4ac3-4b68-85df-47c60d2d46d4

📥 Commits

Reviewing files that changed from the base of the PR and between 1f0b0fc and c2afbeb.

📒 Files selected for processing (1)
  • packages/extension/src/server_manager.ts

Included review availability: Your plan includes up to 3 reviews per rolling hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The extension updates server startup output to document Google connector token-paste support alongside browser-based OAuth. Existing browser and IPC environment logging remains unchanged.

Changes

Google connector messaging

Layer / File(s) Summary
Document Google authentication options
packages/extension/src/server_manager.ts
Startup output now lists Google token-paste and browser-based OAuth support.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to c2afb

This localized change only improves logging for Google token and browser sign-in support; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR addresses Google authentication but does not implement the linked issue's Gmail read or Google Sheets write capabilities. Implement and validate Gmail read and Google Sheets write operations, or link the remaining implementation in this PR.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the Google token-paste authentication change alongside browser OAuth.
Out of Scope Changes check ✅ Passed The logging change supports the stated Google dual-authentication objective and does not introduce unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/google-token-via-token

Comment @coderabbitai help to get the list of available commands.

@Rchari1
Rchari1 merged commit f0c5f3e into main Aug 17, 2026
7 checks passed
@Rchari1
Rchari1 deleted the fix/google-token-via-token branch August 17, 2026 20:09
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.

BUG: No Google Workspace integration (Gmail read, Sheets write)

1 participant