fix(oauth): expose live device hints and hide callback paste - #5915
codingbooo wants to merge 1 commit into
Conversation
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (11)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughOAuth login status now exposes the active URL, device code, and instructions. The add-provider interface refreshes these hints during polling, hides callback paste while a device code is active, and clears the URL when the login settles. ChangesLive OAuth device-login hints
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant OAuthController
participant loginState
participant getLoginStatus
participant useAddProviderOAuth
participant LoginHint
OAuthController->>loginState: Store current onAuth hint
useAddProviderOAuth->>getLoginStatus: Poll provider status
getLoginStatus->>loginState: Read active hint
getLoginStatus-->>useAddProviderOAuth: Return URL, device code, instructions, and done
useAddProviderOAuth->>LoginHint: Update displayed login hint
Possibly related PRs
Merge Risk: ⚪ Minimal · up to Live device-login hints reach the add-provider interface. No identified issue prevents merging after normal checks. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to Live device-login codes can now be read through the login-status endpoint by other authorized management clients, not just the client that started the login. Whether that sharing is intended needs review. The endpoint is authenticated, and the code is removed when the flow settles. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 8 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⏳ DRAFT
What to do
Review readiness checklist
✅ 4/4 boxes ticked. This pull request was already a draft. Its draft status will be preserved after every issue above is resolved. |
리뷰 · 우선순위 51 / 80Meta Muse처럼 브라우저에서 코드를 승인하는 로그인에서, 화면이 예전 안내를 붙들거나 코드를 보여 주면서도 콜백 주소를 붙여 넣으라고 하는 문제를 고칩니다. 이슈 #5881을 닫는 PR입니다. 서버는 진행 중인 로그인의 주소, 기기 코드, 안내 문구를 기억합니다. 상태 조회는 그 최신 값을 돌려주고, 로그인이 끝나거나 취소되면 안내를 지웁니다. 이미 취소된 로그인이 나중에 보낸 안내는 무시합니다. 추가 공급자 화면은 기기 코드가 있는 동안 붙여 넣기 칸을 숨깁니다. 코드가 빠지고 수동 입력으로 바뀌면 칸이 다시 나옵니다. 예전에 로그인된 계정이 있어도, 이번 시도가 끝나기 전에는 성공으로 치지 않습니다.
메인테이너의 판단이 필요한 지점 #5911도 #5881을 닫겠다고 되어 있고, 같은 로그인 안내와 붙여 넣기 칸을 고칩니다. #5911은 안내를 너의 추천 #5911에 이 PR만의 차이가 없으면 이 PR은 닫으세요. 이 쪽을 살린다면 공급자 페이지 폴링도 최신 안내를 따라가게 하고, 상태 조회에 로그인 시작과 같은 대시보드 세션 조건을 거세요. 화면 캡처, 본문 아래쪽 체크리스트 4개, 이 댓글은 grok-bot이 작성했습니다 |
…ards (batch 9D) (#5986) A second `ocx` instance now leaves the live proxy's shared client routing alone across startup, management requests, restart, and stop. The batch also makes Home-side Remote Link usable from the local dashboard, keeps OAuth device guidance current, and offers one-time pairing on an authenticated remote hub that lacks a GUI session. | PR | Change | Author | |---|---|---| | #5926 | Isolate sibling startup, shared writes, restart and stop from the live owner. | JUN (lidge-jun) | | #5928 | Admit the local Home dashboard to SSH host discovery/probe/apply, improve SSH resolution and bounded errors, and keep Child join paired-only. | JUN (lidge-jun) | | #5911 | Show Meta Muse OAuth only to eligible GUI sessions and replace stale device hints through login. | Ingwannu, with shared device-hint work credited to codingbo | | #5978 | Show the one-time pairing form on Remote Link for a remote hub without a GUI session. | RHODIZSECURITY | The owner's three original commits retain JUN authorship. Each contributor PR remains one attributed squash commit. The older device-hint variant (#5915) is outside this branch because #5911 covers the same login behavior; its shared implementation is credited to codingbo. Follow-up commits after independent review: | Commit | Result | |---|---| | `66967095d0` | Restrict the new pairing display path to hub runtimes; a non-loopback standalone keeps its local-session guidance. | | `fa182b9d2d` | Keep sibling-home roster updates available while skipping the shared Claude Desktop profile auto-apply, including after asynchronous discovery. | | `32d7893113` | Require a fresh, home-bound listener proof before an orphan stop can signal a discovered proxy. | | `dda805fbad` | Require a short-lived, one-use sibling restart handoff record bound to the prior sibling runtime and home; a port env alone cannot claim sibling status. | | `37f368cf20` | Keep the connected-client sibling recycle path valid when its runtime record has no server attestation secret; the same-home PID, ports and process-local mark still gate issuance. | | `a42fcac751` | Capture the connected sibling's one-use handoff before link recycle stops the listener and removes its runtime record; spawn with that captured environment. | | `d3cc7b80bb` | Remove the Kiro cooldown test's timestamp-order race exposed by macOS CI. | `dev` advanced during review. Merge commit `a4d9aff73e` brought in `177c647d9c` and kept both the SSH PATH and listener-before-supervisor Remote Link contracts. Merge commit `43d314287c` brings in current `dev` `93e5d5bea5` without changing the owner's commits. Their combined dashboard structure document exceeded its line budget; `1e93a8401b` reflows the existing OAuth paragraph from 603 to 600 lines without raising the cap. The Kiro timing correction also landed independently on `dev`; the merge keeps that current test. Screenshots from the built GUI (demo session and responses only):    Security re-review should focus on sibling start/stop and handoff (`src/codex/sibling-start.ts`, `src/codex/sibling-handoff.ts`, `src/client/runtime.ts`, `src/cli/index.ts`, `src/server/proxy-liveness.ts`), Desktop auto-apply (`src/server/management/agent-settings-routes.ts`), Remote Link admission and SSH (`src/server/management/link-routes.ts`, `src/link/ssh-argv.ts`, `src/link/ssh-runner.ts`), OAuth state and principal discovery (`src/oauth/index.ts`, `src/oauth/login-flow-state.ts`, `src/server/management/oauth-account-routes.ts`), and the hub-only pairing gate (`gui/src/App.tsx`). Independent reviewer sign-off remains required before merge. Co-authored-by: Ingwannu <ingwannu@users.noreply.github.com> Co-authored-by: codingbo <cnsdbo@163.com> Co-authored-by: RHODIZSECURITY <180237049+RHODIZSECURITY@users.noreply.github.com>
|
Closing as superseded: #5911 covers the same Meta Muse device-hint and callback-paste problem more fully, including principal-aware discovery and stale-flow fencing. It landed on |
Summary
Closes #5881.
For device-code OAuth flows (such as Meta Muse), the add-provider UI previously continued rendering the manual callback/redirect paste affordance, and subsequent
onAuthhint transitions during polling were not reliably projected to the client status surface.Implemented via Codex (
gpt-6-astra):deviceCode,url, andinstructionsin login flow state and project them ingetLoginStatus.gui/src/components/login-url-block.tsx, gate the manual callback/redirect paste input on the absence of an activedeviceCode.use-add-provider-oauth.ts, update live auth hints dynamically from polled status.gui/tests/login-url-block.test.tsxandtests/oauth/.Verification
bun run typecheckpassed cleanly.bun run lint:guipassed.bun test gui/tests/ tests/oauth/passed cleanly.Review readiness checklist
Checklist
devReview readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
New Features
Bug Fixes