#2535: fix(google-antigravity): use 127.0.0.1 instead of localhost for OAuth redirect
extensions: google-antigravity-auth
Cluster:
OAuth and CLI Fixes
## 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
#5064: fix(auth): update deprecated User-Agent headers
by mfortin014 · 2026-01-31
82.2%
#2657: fix: use TLS 1.2 for gemini-cli and google-antigravity OAuth reques...
by PrentissLiu · 2026-01-27
80.7%
#5210: Fix Antigravity server side checks and returning Version error
by Ivorisnoob · 2026-01-31
78.8%
#7781: fix: resolve Google Gemini CLI auth credential extraction #4585
by ManojPanda3 · 2026-02-03
78.7%
#4445: fix: resolve Antigravity "unsupported version" and tool_use schema ...
by harry2690 · 2026-01-30
76.7%
#16684: fix:(antigravity): align Antigravity OAuth project discovery header...
by vincentkoc · 2026-02-15
76.0%
#16786: fix: support google-antigravity OAuth for Gemini embeddings
by outsourc-e · 2026-02-15
75.5%
#5027: fix(auth): use correct OAuth credentials for google-gemini-cli refresh
by shayan919293 · 2026-01-30
75.5%
#2123: fix(auth): sync from Claude CLI keychain before OAuth refresh
by jorge123255 · 2026-01-26
74.1%
#20047: fix(googlechat): typing indicator shows 'OpenClaw' instead of agent...
by xinhuagu · 2026-02-18
73.5%