Skip to content

auth: a refused paste no longer ends the sign-in - #45

Merged
zeekay merged 2 commits into
mainfrom
fix/login-paste
Nov 7, 2026
Merged

zeekay merged 2 commits into
mainfrom
fix/login-paste

Conversation

@zeekay

@zeekay zeekay commented Nov 7, 2026

Copy link
Copy Markdown
Member

Lines pasted after hanzo auth login reach its paste leg. A curl … \ line was taken as a bare authorization code, IAM refused it (invalid_grant), and the login exited — closing the loopback the browser was about to return to, so Safari showed "Can't connect to the server" while the real code sat in its address bar.

  • A pasted line with whitespace or a scheme is not a code, so it never reaches the token endpoint.
  • A code IAM refuses is answered and the race goes on; the port stays open for the browser.
  • A URL carrying another sign-in's state is answered instead of aborting.
  • Errors print as one line (Error: …) without the stack backtrace RUST_BACKTRACE added.

Tests: wire_a_refused_paste_leaves_the_sign_in_waiting and wire_after_a_refused_paste_the_browser_still_lands (both fail against the old code), a_pasted_command_or_address_is_not_a_code. cargo test --bin hanzo: 399 passed.

Release 8.5.913.

zeekay and others added 2 commits November 6, 2026 17:00
Lines pasted after `hanzo auth login` reach its paste leg. A `curl … \` line
was taken as a bare code, IAM refused it, and the login exited, closing the
loopback the browser was about to return to (Safari: "Can't connect to the
server"). Now a line with whitespace or a scheme is not a code, a code IAM
refuses is answered and the race goes on, and a URL from another sign-in is
answered rather than aborting. Errors print as one line, without the
backtrace RUST_BACKTRACE added to every failure.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
Co-authored-by: Hanzo Dev <dev@hanzo.ai>
@zeekay
zeekay merged commit 4f6fdef into main Nov 7, 2026
5 checks passed
@zeekay
zeekay deleted the fix/login-paste branch November 7, 2026 01:11
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