Repository navigation
feat(login): print the confirmation code the sign-in page asks for - #479
Open
mkherlakian wants to merge 1 commit into
Open
mkherlakian wants to merge 1 commit into
mkherlakian wants to merge 1 commit into
Conversation
hookdeck login and the MCP login tool now ask POST /cli-auth for a user code (RFC 8628) and show it with the sign-in link. The browser page asks for that code before connecting the CLI. An API that issues no code is handled as before: only the link is shown. Co-Authored-By: Claude Opus 5.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.
What
hookdeck loginand the MCP login tool now show a confirmation code next to the sign-in link. The browser page asks for that code before it connects the CLI (RFC 8628user_code).How
StartLoginsendswith_user_code: truetoPOST /cli-authand readsuser_codefrom the response intoLoginSession.UserCode.printLoginLinkprints the code under the URL on both paths: SSH or no browser, and the Enter-to-open path.Compatibility
user_code. The CLI then prints only the link, as it does today, so this can ship before or after the API change.Tests
pkg/hookdeck/auth_test.go: the request carrieswith_user_code, a returned code is read, and a missing one leavesUserCodeempty.pkg/login/login_link_test.go: the printed output with and without a code.pkg/gateway/mcp/server_test.go: the code appears in the first and in-progress results, and no code line appears without one.go vet ./...passes.go test ./...passes exceptTestLogin_rejectedKeyHeadlessFailsFastandTestCheckServerHealth_DefaultPorts. Both fail the same way on unmodifiedmainin the Dockergolang:1.26container I ran them in (no DNS, and TTY detection behaves differently there).🤖 Generated with Claude Code