Skip to content

Use 127.0.0.1 instead of localhost in OAuth redirect URL#175

Merged
jancurn merged 2 commits intomainfrom
claude/investigate-issue-174-jPg60
Apr 16, 2026
Merged

Use 127.0.0.1 instead of localhost in OAuth redirect URL#175
jancurn merged 2 commits intomainfrom
claude/investigate-issue-174-jPg60

Conversation

@jancurn
Copy link
Copy Markdown
Member

@jancurn jancurn commented Apr 16, 2026

Summary

Updated the OAuth callback redirect URL to use the IP address 127.0.0.1 instead of the hostname localhost.

Fixes #174

Changes

  • Changed OAuth redirect URL from http://localhost:${port}/callback to http://127.0.0.1:${port}/callback in the performOAuthFlow function

Details

This change ensures the OAuth callback uses an explicit IP address rather than relying on hostname resolution. Using 127.0.0.1 directly can provide more reliable behavior across different system configurations and avoid potential DNS resolution issues during the OAuth authentication flow.

https://claude.ai/code/session_017PVtniLsGiFSSNx9RZLW4f

claude added 2 commits April 16, 2026 09:52
The callback server binds to 127.0.0.1 (IPv4) but the redirect URL
used "localhost", which on some systems (notably macOS) resolves to
::1 (IPv6), causing a connection refused / 404 on the OAuth callback.

Use 127.0.0.1 in the redirect URL to match the actual bind address.

Fixes #174

https://claude.ai/code/session_017PVtniLsGiFSSNx9RZLW4f
The auto-generated help code block in README.md was empty, causing
the readme-help unit test to fail across all Node.js versions in CI.

https://claude.ai/code/session_017PVtniLsGiFSSNx9RZLW4f
@jancurn jancurn merged commit 1957a7d into main Apr 16, 2026
6 checks passed
@jancurn jancurn deleted the claude/investigate-issue-174-jPg60 branch April 16, 2026 10:19
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.

OAuth flow terminates with 404 (localhost vs 127.0.0.1)

3 participants