Skip to content

Allow configuring the callback server bind host - #2

Open
TheGreatAxios wants to merge 1 commit into
mainfrom
upstream
Open

Allow configuring the callback server bind host#2
TheGreatAxios wants to merge 1 commit into
mainfrom
upstream

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

startCallbackServer hardcoded a 127.0.0.1 bind. Clients whose registered redirect URI is localhost-based (e.g. Codex at localhost:1455) never receive the provider's redirect on hosts that resolve localhost to ::1 with no IPv4 fallback, because the loopback server is unreachable over IPv6.

CallbackServerConfig gains an optional host field. The default stays 127.0.0.1, so existing callers with 127.0.0.1-registered redirect URIs (e.g. xAI) are unaffected. A round-trip test binds ::1 and completes a full redirect through the configured host.

Test plan

  • bun run check (typecheck, eslint, prettier, bun test) — 8 pass / 0 fail, including the new "listens on the configured host" round-trip test.

The callback server hardcoded a 127.0.0.1 bind. Clients whose
registered redirect URI is localhost-based (Codex at localhost:1455)
never receive the provider's redirect on hosts that resolve localhost
to ::1 with no IPv4 fallback, because the loopback server is
unreachable over IPv6.

CallbackServerConfig gains an optional host field; the default stays
127.0.0.1, so 127.0.0.1-registered callers (xAI) are unaffected.
Loopback-only is enforced: localhost, ::1, and 127.0.0.0/8 are
accepted; wildcard and routable hosts are rejected up front, and
port-in-use errors name the configured host.
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.

1 participant