Repository navigation
fix(sign-in): open a pasted sign-in code from the popup (VTI-LNK-105 – 107) - #450
Merged
Merged
Conversation
…– 107) An assistant over vtc-mcp signs its own key in as the person with `vtc_sign_in`, which hands the person a `sign-in` trigger link. The bridge has no page on the community's portal, so the link could never be clicked there, and the popup's paste box took `step-up` links only. Neither the member nor the admin audience could be completed with the browser wallet. VTI-LNK-105 binds a reader that recorded an activation origin. A pasted code has none, the same footing as a code scanned with a camera. The popup's box (`OpenPastedLink`, `RUNTIME_PASTED_LINK`, extension pages only) now also takes a `sign-in` link and opens the sign-in window with a flow record carrying `pasted: true` and no origin. For such a flow: - the confirm screen is never skipped, and says the code was pasted (no click on the portal stands for the go-ahead, VTI-LNK-106); - no page number is waited for or taken, so the person types the number the assistant shows (VTI-LNK-107); - only a community already in the wallet's records is signed in to; a site it does not know is `not-member`, with no join or hosting offer; - no origin is pinned. `pasted` is an explicit flag set only on the popup path. A click whose origin went missing is still `wrong-origin`, and a pasted flow that carries an origin is refused. Signed-off-by: Glenn Gore <glenn.g@affinidi.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.
Problem
An assistant over
vtc-mcpsigns its own key in as the person withvtc_sign_in, which hands the person asign-intrigger link. With the browser wallet, neither themembernor theadminaudience could be completed:wrong-origin(sign-in-flows.ts,!origin || !originMatchesPortal(...));step-uplinks only.A user setting up vtc-mcp hit exactly this and had to fall back to enrolling a signing key through the console.
Why this is spec-conformant
VTI-LNK-105 binds "a reader that recorded the origin of the page the link was activated from". A pasted code has no recorded origin, which is the footing of a code scanned with a camera. In that case the spec relies on the number the person enters (VTI-LNK-106 / 107 don't apply). The wallet was stricter than the spec here.
Change
The popup box (
OpenPastedLink, nowRUNTIME_PASTED_LINK, extension pages only) also takes asign-inlink. It opens the sign-in window with a flow record carryingpasted: trueand no origin. For such a flow:pageNumberdrops it;handleTriggerLinkNumberskips pasted records). The person enters the number the assistant shows, and the community checks it (VTI-LNK-107).not-member, with no join or hosting offer and nothing sent.pastedis an explicit flag set only on the popup path. A click whose origin went missing is stillwrong-origin, and a pasted flow that carries an origin is refused.RUNTIME_STEP_UP_LINKis renamed toRUNTIME_PASTED_LINK(vta-wallet/pasted-link). The step-up behaviour is unchanged. CLAUDE.md has a new section on the pasted sign-in path.Tests
sign-in-flows.test.mts: a missing origin withoutpastedis stillwrong-origin. A pasted code keeps the confirm screen and sends nothing before Continue. A pasted code never takes a page number: it reachesenter-numberat once even with a 60 s page wait, and the grant still names the verified portal origin. Pasted with an origin is refused. Pasted for an unknown community or DID host returnsnot-memberwith nothing sent.sign-in-view.render.test.mts: a pasted confirm with one identity is not auto-claimed and shows the note.npm run lint,npm run buildand the extension suite pass (1573/1573).Companion change: OpenVTC/verifiable-trust-infrastructure#2794 updates
vtc_sign_in's instructions to say "paste it into the wallet popup".Pre-merge checklist
pastedflag still refuses