Skip to content

Handle Google Sign-In via separate window instead of proxying#4

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/update-google-signin-logic
Draft

Handle Google Sign-In via separate window instead of proxying#4
Copilot wants to merge 2 commits intomainfrom
copilot/update-google-signin-logic

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 2, 2026

Google's authentication policies break when proxied through the worker. This adds interception for Google Auth URLs to de-proxy them and open in a separate popup window, allowing direct authentication with Google.

Injection Script Changes

  • Added isGoogleAuthUrl() to detect Google auth patterns (accounts.google.com, googleapis.com/identitytoolkit, OAuth endpoints)
  • Added deProxyUrl() to extract original URLs from /proxy/{encoded} format
  • Extended window.open interceptor for Google Auth detection
  • Added click/submit event listeners (capture phase) for Google Auth links and forms
  • Wrapped DOM event listeners in DOMContentLoaded check

Main UI Changes

  • Added GOOGLE_AUTH message handler that opens a 500x600 popup directly to Google

Example Flow

// Intercepted proxied URL
'/proxy/https%3A%2F%2Faccounts.google.com%2Fo%2Foauth2%2F...'

// De-proxied and opened in separate window
'https://accounts.google.com/o/oauth2/...'

Also updated README to reflect new Google Sign-In behavior.

Original prompt

give me a updated worker script that uses the same ui and game interseption, but handles google-sign in diffrentley by not proxying it so it looks like its comming from cloudmoon (use a similar interseption system to look for the proxyied google auth url, de proxy it, and then load it in a seprate window.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…oxying

Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
Copilot AI changed the title [WIP] Update worker script for Google sign-in handling Handle Google Sign-In via separate window instead of proxying Feb 2, 2026
Copilot AI requested a review from sriail February 2, 2026 23:45
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