Skip to content

login: print pairing deeplink alongside the QR#400

Draft
bgodlin wants to merge 1 commit into
paritytech:mainfrom
0xDevCult:login-print-deeplink
Draft

login: print pairing deeplink alongside the QR#400
bgodlin wants to merge 1 commit into
paritytech:mainfrom
0xDevCult:login-print-deeplink

Conversation

@bgodlin

@bgodlin bgodlin commented Jun 16, 2026

Copy link
Copy Markdown

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.

@bgodlin
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
bgodlin force-pushed the login-print-deeplink branch 2 times, most recently from d324364 to aa3524f Compare June 17, 2026 14:13
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