bug(sdk/go): browser login callback binds 127.0.0.1 but redirect_uri uses localhost
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go
- Domain
- authentication
Research direction
The listener is in oidc/authcode.go (startCallbackServer, which calls net.Listen on 127.0.0.1) and the redirect URI is built in oidc/oidc.go (loginBrowser, which uses localhost). Read both, then decide whether to change the redirect host to 127.0.0.1 or make the listener cover both loopback families. Done means the host in the redirect URI matches what the server accepts, and the Login flow still completes on a normal IPv4 host. The issue has not been reproduced, so confirm the IPv6 case before treating it as fixed.
Written by the indexing model from the issue text.
Description
User Story
I use OpenShell and build automation against its SDKs. I found this while reviewing sdk/ on main; it is identified from the code paths cited below and has not yet been reproduced against a live gateway.
Problem Statement
startCallbackServer listens on 127.0.0.1:<port>, but loginBrowser sends redirect_uri=http://localhost:<port>/callback. The CLI uses 127.0.0.1 for both.
Impact / Why This Matters
On hosts or browsers where localhost resolves to ::1 first without IPv4 fallback, the IdP redirect fails to reach the callback and Login times out.
Acceptance Criteria
- The redirect URI host matches the address the callback server listens on (or the server listens on both loopback families).
Reproduction Steps
Code reference: oidc/authcode.go net.Listen("tcp", "127.0.0.1:%d") vs oidc/oidc.go fmt.Sprintf("http://localhost:%d/callback", port). On a host where localhost maps only to ::1, run oidc.Login.
Suggested UX (if applicable)
No response
Environment
- OpenShell:
main@ 82977e2 (2026-10-13) - SDK: Go (
sdk/go/openshell/v1/oidc) - Toolchain: Go 1.25.4 linux/amd64, Node 22
Logs
- Dominant language
- Rust
- Stars
- 15.4k
- Forks
- 1.7k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 374
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/OpenShell
-
state:triage-needed
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
bug(sdk/go): edge (Cloudflare Access) token is cached for the client lifetime and never reloadedOpenstate:triage-needed
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
state:triage-needed
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
state:triage-needed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
docs(upgrade): no migration notes for 0.1.1, 0.1.2, or 0.1.3 (only the 0.1.0 page exists)Possibly taken A pull request linked to this issue is open or already merged. Openstate:triage-needed
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
All issues in NVIDIA/OpenShell
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cmlarsen/writemorebetter#158 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
scanaislop/aislop#482 ·
Maintainers usually reply within 1 day
-
docs(skills): issue-first should reference an existing Linear ticket instead of filing a duplicateOpendocumentation
Difficulty 1/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
chatmail/core#8824 · 1 comment ·
Maintainers usually reply within 1 day