← Back to PRs

#2535: fix(google-antigravity): use 127.0.0.1 instead of localhost for OAuth redirect

by brian033 open 2026-01-27 03:05 View on GitHub →
extensions: google-antigravity-auth
## Summary - Fix Google Antigravity OAuth authentication failure caused by Google blocking HTTP localhost redirects - Change redirect URI from `http://localhost:51121` to `http://127.0.0.1:51121` ## Why Google's OAuth 2.0 security policy blocks `http://localhost` redirects but explicitly allows loopback IP addresses (`127.0.0.1`) for native app flows. This is documented in [Google's OAuth 2.0 policy](https://developers.google.com/identity/protocols/oauth2/policies#secure-response-handling). Fixes [#2463](https://github.com/clawdbot/clawdbot/issues/2463) ### AI Disclosure I've used claude code for this commit, thanks <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates the Google Antigravity OAuth redirect URI from `http://localhost:51121/oauth-callback` to `http://127.0.0.1:51121/oauth-callback` to comply with Google’s OAuth loopback redirect policy, and adds a small UX improvement to print the raw auth URL to the terminal during manual flow. The change is isolated to the `google-antigravity-auth` extension: it affects how the auth URL is constructed and how the local callback server is reached, without changing token exchange or credential persistence logic. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Change is narrowly scoped (string/redirect host update plus extra logging) and aligns with existing callback server binding to 127.0.0.1; no control-flow or security-sensitive logic was altered beyond the redirect URI used in OAuth requests. - extensions/google-antigravity-auth/index.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs