mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-15 11:22:15 +03:00
omniroute oauth start --provider antigravity (and any other browser-flow
provider whose resolved redirect_uri is a loopback address) prints the Google
authorize URL and silently waits for a pasted callback, but nothing in the
CLI's own output warns that the browser is about to hit a dead port before
showing a confusing connection-error page. The redirect_uri the CLI advertises
(via the server's authorize response) was never bound to a real listener, and
nothing told the operator that seeing the error is expected.
Add isLoopbackHost() (mirrors src/lib/oauth/providers.ts::isLoopbackHostname)
and print a note right before opening the browser whenever the resolved
redirect is loopback, explaining the expected browser error and, for
antigravity specifically, pointing at the existing omniroute login antigravity
command which already binds a real local listener and captures the code
automatically.
Regression test: tests/unit/probe-12413-antigravity-oauth-redirect-hint.test.ts
- RED (before fix): CLI output contained the dead localhost:8080 redirect
with no warning
- GREEN (after fix): warning is printed for antigravity's loopback redirect,
and NOT printed for claude-code's fixed non-loopback redirect