Skip to content

bind local callback server to configured host, not all interfaces - #1175

Open
arib06 wants to merge 1 commit into
googleapis:mainfrom
arib06:localserverreceiver-bind-loopback
Open

arib06 wants to merge 1 commit into
googleapis:mainfrom
arib06:localserverreceiver-bind-loopback

Conversation

@arib06

@arib06 arib06 commented Oct 8, 2026

Copy link
Copy Markdown

LocalServerReceiver.getRedirectUri() starts the HTTP server that receives the OAuth 2.0 authorization code with new InetSocketAddress(port), which binds the wildcard address and listens on every interface, while the redirect URI it hands back only ever uses the configured host (localhost by default), so the code-bearing callback is reachable from the whole network rather than just loopback; binding new InetSocketAddress(host, port) makes the listener match the advertised URI.

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

@arib06
arib06 requested review from a team as code owners October 8, 2026 11:57
@product-auto-label product-auto-label Bot added the size: s Pull request size is small. label Oct 8, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant