Skip to content

fix: open Keyring from the same device with its keyring:// scheme - #120

Merged
vthwang merged 1 commit into
mainfrom
fix/keyring-same-device-link
Oct 24, 2026
Merged

vthwang merged 1 commit into
mainfrom
fix/keyring-same-device-link

Conversation

@geoffturk

Copy link
Copy Markdown
Member

Problem

On a phone, tapping Open in Keyring navigated to the VTI trigger link as is, an https://link.trustoverip.org/t#… URL. That host has no public DNS yet, and Keyring does not claim it as a Universal Link or App Link (its associated domains and autoVerify intent filters only cover wallet.asml.berkmancenter.org and witness.asml.berkmancenter.org), so the browser showed ERR_NAME_NOT_RESOLVED instead of launching the app.

Fix

Keyring registers its own keyring URL scheme on iOS (CFBundleURLSchemes in keyring-wallet/app/ios/AriesBifold/Info.plist) and Android (a BROWSABLE intent filter in AndroidManifest.xml). Its trigger-link reader (triggerLink.ts and vtiLinks.ts in keyring-bifold) accepts keyring as an alias scheme for https, resolves _type against https:// and the link's own host, and routes an accepted vta-claim flow to the agent setup screen. Rewriting the prefix is enough; the host and fragment must stay verbatim.

  • src/lib/utils.ts: add keyringSameDeviceLink, which swaps a leading https:// for keyring:// and returns any other link unchanged.
  • src/pages/portal/ConnectionMethodUi.tsx: use that link for both Open in Keyring buttons and for the anchor around the QR image, which also led to the dead page when tapped on a phone.

The QR code still encodes the unmodified https:// link. Keyring's scanner reads both forms, but a phone camera cannot open a custom scheme.

Not included

  • No Android intent:// wrapper with a Play Store fallback. Keyring has no https intent filter for this host, so it would need scheme=keyring, and how Chrome passes the fragment through that form is unverified. The plain keyring:// link is handled by Chrome and Brave through the existing BROWSABLE filter.
  • No changelog entry; the changelog is written in release commits.

Testing

Type check and ESLint pass (run in a node:24-alpine container). Manual test on a phone: open the portal in Brave or Safari and tap Open in Keyring. iOS should prompt "Open in Keyring?" and land on the agent setup screen. Typing the keyring:// link into the address bar is not a valid test, since Brave and Chrome treat an unknown scheme as a search query; only a page navigation is handed to the OS. If the installed TestFlight build predates vta-claim support in keyring-bifold (the wallet pins commit e2677d4 from 2026-10-23), Keyring opens but reports that the code needs a newer app version.

On a phone, "Open in Keyring" navigated to the VTI trigger link as is,
an https URL on link.trustoverip.org. That host has no public DNS yet,
and Keyring does not claim it as a Universal Link or App Link, so the
browser showed ERR_NAME_NOT_RESOLVED instead of launching the app.

Keyring registers its own `keyring` URL scheme on iOS
(CFBundleURLSchemes) and Android (a BROWSABLE intent filter), and its
trigger-link reader accepts that scheme as an alias for https, routing
an accepted vta-claim flow to the agent setup screen. Rewriting the
prefix is enough; the host and fragment must stay verbatim.

- src/lib/utils.ts: add keyringSameDeviceLink, which swaps a leading
  https:// for keyring:// and leaves any other link unchanged.
- src/pages/portal/ConnectionMethodUi.tsx: use that link for both
  "Open in Keyring" buttons and for the anchor around the QR image,
  which also led to the dead page when tapped on a phone.

The QR code still encodes the https:// link: Keyring's scanner reads
both forms, but a phone camera cannot open a custom scheme. No Android
intent:// wrapper is added, since Keyring has no https intent filter
for this host and the fragment handling of that form is unverified.

Signed-off-by: Geoff Turk <geoff@ic3.dev>
@geoffturk
geoffturk requested a review from vthwang October 24, 2026 17:15
@vthwang
vthwang merged commit 78cd9da into main Oct 24, 2026
1 check passed
@vthwang
vthwang deleted the fix/keyring-same-device-link branch October 24, 2026 21:49
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.

2 participants