Skip to content

Two-phase loading system for Google Sign-In + proxy game support#1

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/update-google-signin-proxy
Draft

Two-phase loading system for Google Sign-In + proxy game support#1
Copilot wants to merge 6 commits intomainfrom
copilot/update-google-signin-proxy

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 2, 2026

Google Sign-In fails through the proxy with origin_mismatch because OAuth validates window.location.origin client-side before any requests. Proxying cannot bypass this.

Solution

Two-phase loading system:

  • Direct Mode (default): Loads https://web.cloudmoonapp.com/ directly → Google Sign-In works
  • Proxy Mode (toggle): Loads through worker proxy → game interception works, session persists

Changes

  • Added "Enable Proxy" toggle button with visual state (green/purple)
  • createShadowFrame() accepts useProxy parameter to switch URL sources
  • Simplified injection script to game interception only (no Google button hiding needed)
  • Updated README with two-phase workflow instructions

Usage Flow

1. User opens page → Direct Mode loads
2. User signs in with Google
3. User clicks "Enable Proxy" → Proxy Mode loads
4. User plays games (window.open intercepted, games load in iframe)

Existing UI preserved: tab cloak, about:blank, fullscreen, reload, back button.

Original prompt

I need a huge update. currentley this cloudflare worker dose not work with google sign in and you get the error accounts.google.com is blocked
accounts.google.com refused to connect.
ERR_BLOCKED_BY_RESPONSE and the errors button?theme=outline&size=large&type=standard&is_fedcm_supported=true&client_id=196443591263-k5447s…:1 Failed to load resource: the server responded with a status of 403 ()Understand this error
m=credential_button_library:79 [GSI_LOGGER]: The given origin is not allowed for the given client ID. i waqnt youn to make google sign in pass through the proxy, showing as the cloudmoon sign in, and then forward the auth to the proxy, alowing you to sign in with google. keep all of the current ui, styling, and window interseption system for games, but change how google sign in is handled


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 2, 2026 11:47
Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
…structor

Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Google sign in handling for Cloudflare worker Add Google Sign-In proxy support Feb 2, 2026
Copilot AI requested a review from sriail February 2, 2026 11:50
Copilot AI and others added 2 commits February 2, 2026 11:57
Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
…r observer

Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
Copilot AI changed the title Add Google Sign-In proxy support Fix Google Sign-In OAuth origin_mismatch error Feb 2, 2026
…e for games

Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
Copilot AI changed the title Fix Google Sign-In OAuth origin_mismatch error Two-phase loading system for Google Sign-In + proxy game support Feb 2, 2026
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