Skip to content

Streamlined OAuth-login handling (forward fixed callback ports) - #15

Merged
oz6un merged 1 commit into
mainfrom
feat/oauth-login-forwarding
Aug 11, 2026
Merged

Streamlined OAuth-login handling (forward fixed callback ports)#15
oz6un merged 1 commit into
mainfrom
feat/oauth-login-forwarding

Conversation

@oz6un

@oz6un oz6un commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Why

Browser-OAuth CLIs open a localhost:<port> callback the browser must reach — impossible on a headless box, which is the friction the user hit.

What

Researched + verified the current best approach (fixed callback ports; on-demand forwarding over ControlMaster):

  • Pre-forward the agents' fixed ports (Claude 54545, Codex 1455) in files/mac-ssh-config.snippet — with the existing ControlMaster, browser logins for Claude/Codex complete transparently.
  • Document the on-demand escape hatch for any other tool: ssh -O forward -L <port>:localhost:<port> devbox adds a forward to the live connection with no reconnect (and -O cancel removes it). Verified working over Tailscale SSH.
  • Note device-code/token flows (gh, codex login --device-auth, claude setup-token) that skip forwarding entirely.
  • README gains a 'Logging into other tools later' subsection.

Verified

ssh -L and ssh -O forward/-O cancel both work over this box's Tailscale SSH (curl through each returned HTTP 200). After reconnecting the master, localhost:54545/1455 are bound on the Mac and a listener on the box's localhost:54545 is reachable through them (HTTP 200) — i.e. a real browser redirect would land. make check green. (Mac ~/.ssh/config updated to match.)

🤖 Generated with Claude Code

Browser-OAuth CLIs redirect to a localhost callback port that a headless box
can't receive. Pre-forward the two agents' fixed callback ports (Claude 54545,
Codex 1455) in the mac-ssh-config snippet so their logins complete over the
tunnel transparently; document the on-demand 'ssh -O forward -L port devbox'
one-liner (adds a forward to the live ControlMaster connection, no reconnect —
verified over Tailscale SSH) for any other tool, and the device-code/token
flows that avoid forwarding entirely. README 'Logging into other tools later'.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@oz6un
oz6un merged commit 0f8afdb into main Aug 11, 2026
1 check passed
@oz6un
oz6un deleted the feat/oauth-login-forwarding branch August 11, 2026 18:23
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.

1 participant