Created
October 21, 2025 06:50
-
-
Save maestrofx/410afef84848d058595ed047e8f9fc89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>OAuth Callback</title> | |
| </head> | |
| <body> | |
| <script> | |
| // This script runs when Google redirects the user to this page. | |
| // 1. Extract the authorization code from the URL. | |
| const urlParams = new URLSearchParams(window.location.search); | |
| const code = urlParams.get('code'); | |
| if (code) { | |
| // 2. Send the code back to the main Colab notebook window. | |
| // The '*' target origin is insecure for production, but acceptable for this PoC. | |
| window.opener.postMessage({ type: 'oauth_code', code: code }, '*'); | |
| } | |
| // 3. Close this popup window to complete the flow. | |
| window.close(); | |
| </script> | |
| <p>Authenticating... you can close this window.</p> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment