bug(sdk/go): browser login callback binds 127.0.0.1 but redirect_uri uses localhost
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 65/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- go
研究方向
監聽器位於 oidc/authcode.go(startCallbackServer 在 127.0.0.1 上呼叫 net.Listen),重新導向 URI 則在 oidc/oidc.go 中建構(loginBrowser 使用 localhost)。請閱讀這兩處,然後決定是把重新導向主機改為 127.0.0.1,還是讓監聽器同時涵蓋兩個回送位址族。當重新導向 URI 中的主機與伺服器接受的一致,且 Login 流程在一般 IPv4 主機上仍能完成時,即為完成。此問題尚未重現,因此在視為已修復之前,請先確認 IPv6 的情況。
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- Rust
- 星號
- 15.4k
- 分支
- 1.7k
- 平均合併
- 2 天 3 小時
- 30 天內合併 PR
- 374
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NVIDIA/OpenShell 的其他 Issue
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
bug(sdk/go): edge (Cloudflare Access) token is cached for the client lifetime and never reloaded未關閉state:triage-needed
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆
相似的 Issue
-
docs(skills): issue-first should reference an existing Linear ticket instead of filing a duplicate未關閉documentation
難度 1/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆
-
area: tui good first issue help wanted type: bug
難度 2/5 1-3 小時 新手友好度 72/100
srothgan/claude-code-rust#473 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
storytold/photocraft#5260 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100