login: print pairing deeplink alongside the QR#400
Draft
bgodlin wants to merge 1 commit into
Draft
Conversation
bgodlin
marked this pull request as draft
June 16, 2026 14:15
The pg login QR encodes a polkadotapp://pair?handshake=… deeplink. When the terminal runs on the same device as the Polkadot app (e.g. a browser terminal on a phone) you can't scan a QR on your own screen, so also print a link: - thread the raw deeplink (status.payload) out of connect() as result.link; - print it below the (unchanged) QR. When PG_LOGIN_LINK_BASE is set, print an https link that redirects to the deeplink instead — the form browser terminals (ttyd/xterm.js) reliably make tappable, since they don't linkify custom schemes and canvas text isn't selectable on iOS. Unset = raw deeplink. Additive; the QR rendering is unchanged. An official https universal link for pairing would let the CLI print a tappable link unconditionally and drop the env var.
bgodlin
force-pushed
the
login-print-deeplink
branch
2 times, most recently
from
June 17, 2026 14:13
d324364 to
aa3524f
Compare
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.
The login QR encodes a polkadotapp://pair?handshake=… deeplink. Surface it as text (OSC 8 hyperlink) so a user can paste/tap it on the same phone: e.g. when the terminal runs in a mobile browser and the QR can't be scanned from the same screen. Purely additive; same data the QR already shows.