Streamlined OAuth-login handling (forward fixed callback ports) - #15
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
54545, Codex1455) infiles/mac-ssh-config.snippet— with the existing ControlMaster, browser logins for Claude/Codex complete transparently.ssh -O forward -L <port>:localhost:<port> devboxadds a forward to the live connection with no reconnect (and-O cancelremoves it). Verified working over Tailscale SSH.codex login --device-auth,claude setup-token) that skip forwarding entirely.Verified
ssh -Landssh -O forward/-O cancelboth work over this box's Tailscale SSH (curl through each returned HTTP 200). After reconnecting the master,localhost:54545/1455are bound on the Mac and a listener on the box'slocalhost:54545is reachable through them (HTTP 200) — i.e. a real browser redirect would land.make checkgreen. (Mac~/.ssh/configupdated to match.)🤖 Generated with Claude Code