Repository navigation
s1 login: wait for browser callback and device code together - #19
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DuYf7wb1EAoffTQ9poskFK
Merged
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.
Requested by fatwang2 · project thread
Why
Follow-up to #18. Users shouldn't have to know whether to pass
--device. Like Claude Code's login, one command should work whether the browser is on this machine or another one.What
s1 loginnow runs both flows side by side: the loopback browser login (opens the browser as before) and the device code flow (prints URL + short code for another device). The first to succeed wins and the other is cancelled (local callback server closed, polling stopped). It fails only if both fail.--devicestill runs only the short-code flow. Removed the SSH hint added in Add s1 login --device for cross-device sign-in #18 (no longer needed).AbortSignalsupport inloginWithBrowserandloginWithDeviceCode.Testing
npm test51/51 (new test: device polling stops on cancel).s1 login --no-browserin a cloud container, approved from another device via the device link; tokens saved,/usagevalidation passed, process exited 0 (callback server closed).Generated by Claude Code