fix: support deterministic SSH login callbacks in init#229
Open
microHoffman wants to merge 1 commit into
Open
Conversation
Add strict shared callback-port parsing to login and init so remote users can prepare SSH forwarding before starting OAuth. Clarify loopback behavior, headless guidance, and non-interactive token usage with unit and smoke coverage.
Member
|
I'm sorry, but we don't have CLA in place and cannot yet accept external contributions. But I will add this to our backlog. Thank you! |
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.
Summary
--port <port>togithits initand forward it through the existing OAuth login flowinitandlogin--no-browsermodeWhy
--no-browseronly suppresses browser launching. The OAuth callback server still listens on the loopback interface of the machine running GitHits. When GitHits runs on a remote VM but the sign-in URL is opened locally, the browser redirects to the local computer's loopback interface and cannot reach the remote listener without SSH forwarding.loginalready allowed a fixed callback port, butinitselected a random port. That prevented users from preparing a deterministic tunnel for the recommended onboarding command.Impact
Remote users can now prepare a tunnel and run
githits init --no-browser --port <port>. Invalid, partial, fractional, and out-of-range ports fail before authentication begins. Existing local login behavior is unchanged.The repository documentation now contains canonical SSH/headless guidance and a handoff for the separately hosted documentation. A true tunnel-free device flow remains server-side follow-up work.
Validation
bun test— 2,502 passedbun run typecheckbun run buildbun run format:checkbun run lintFollow-up
docs/implementation/remote-authentication.md