Repository navigation
fix(browser): let Google sign-in pass in the built-in browser - #556
Conversation
accounts.google.com rejected the Tools panel browser with "This browser or app may not be secure" even with Electron tokens stripped. Reduce the guest Chrome version to its major, as shipping Chrome reports it, and send a current Firefox user agent with no Client Hints only to accounts.google.com, as other Electron browsers (Min) do. Every other host keeps the Chromium identity; profiles, partitions and permissions are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015BrmXrPTREwTbMKNkmHDok
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed the guest browser identity changes, their session/popup integration, focused tests, and documentation.
- Google sign-in exception: HTTPS requests to exactly
accounts.google.comreceive a platform-appropriate Firefox user agent without UA Client Hints; other destinations retain the Chromium identity. - Chromium version reduction: Guest user agents now expose only the Chrome major version while continuing to omit Electron and Aiden product tokens.
- Coverage and documentation: Tests exercise header preservation, host/scheme exclusions, and Firefox identity generation; the browser guide describes the exception and manual verification limit.
Validation: all 193 browser tests passed, along with desktop TypeScript and scoped ESLint. The initial browser run lacked Playwright's Chromium executable; installing it resolved that prerequisite. Live Google sign-in remains unverified in this environment, so this review confirms the implementation and automated checks, not successful authentication against Google.
gpt-6.1-sol | 𝕏
Hermes Review BotConfidence: 4 Engine: SummaryPrevents Google authentication rejections ("Couldn't sign you in. This browser or app may not be secure") in the built-in browser by selectively rewriting outgoing request headers destined for Confidence Score: 4/54/5 — The implementation, header transformations, URL scoping, version math, and test cases have been fully traced across callers and prior art, but live Google sign-in flow validation requires an interactive desktop session on a physical machine. 📁 Important Files Changed
FindingsNo findings. Sequence DiagramsequenceDiagram
autonumber
actor User as User / Tab
participant Guest as WebContentsView (Guest)
participant Session as Session onBeforeSendHeaders
participant Transform as applyBrowserGuestIdentityHeaders
participant Google as accounts.google.com
participant Origin as Target / Other Origin
User->>Guest: Navigate / Open Google Sign-In
Guest->>Session: Outgoing HTTP Request
Session->>Transform: Evaluate request URL and headers
alt Request URL is https://accounts.google.com/*
Transform-->>Session: Firefox UA (matching OS) & omit Sec-CH-UA*
Session->>Google: Forward request (Firefox identity, no Client Hints)
Google-->>Guest: Return login challenge / set .google.com cookies
else Request URL is other host (e.g., mail.google.com, app callback)
Transform-->>Session: Reduced Chrome UA (major.0.0.0) & Sec-CH-UA*
Session->>Origin: Forward request (Chromium identity + Client Hints)
Origin-->>Guest: Standard page response
end
[]
|

Requested by sbt · project thread
Before: signing in to Google in the Tools panel browser ended at accounts.google.com with "Couldn't sign you in. This browser or app may not be secure." That happened even though Aiden already strips the Electron and Aiden tokens from the user agent.
After: requests to
https://accounts.google.comcarry a current Firefox user agent and no UA Client Hints. Every other host, including other Google hosts, keeps the Chromium identity. The guest Chrome version is also reduced to its major (Chrome/150.0.0.0), the way shipping Chrome reports it, because a full build number is an embedded-browser tell.How:
applyBrowserGuestIdentityHeadersinmain/services/browser/core.tsalready rewrites every guest request. It now special-cases the exactaccounts.google.comHTTPS host, the same approach Min browser uses (main/UASwitcher.js). T3 Code has no Google-specific handling: it keeps Electron's native user agent so Cloudflare Turnstile passes (pingdotgg/t3code#7110). The Firefox version follows the four-week release train from Firefox 91, with a slightly longer step so it never claims an unreleased version. Profiles, partitions, permissions and OAuth popups are unchanged. Popups share the tab's session, so they get the same headers.Verification:
core.test.tscovers the sign-in identity, the look-alike and other-Google-host exclusions, the reduced version and the Firefox version window. I rannpm run type-checkandeslinton the touched files, and both are clean.npm run test:browserpasses exceptfiles-browser.test.ts, which can't launch Playwright's headless shell in this sandbox. Google's check runs server-side and can't be reached from the sandbox or CI, so the sign-in has to be confirmed on a real Mac.docs/environment-browser.mdis updated.Generated by Claude Code