Repository navigation
fix(sign-in): pin the page's origin on an approved trigger-link sign-in, so a console can set up signing - #378
Merged
Merged
Conversation
…in, so a console can set up signing A trigger-link sign-in (auth/oob/*) is now the first option on a VTC operator console's login page, and the only wallet sign-in that seeded no origin → relying-party pin (origin-pin.ts, M5). signTrustTask is bound to that pin and never seeds one, so an administrator who signed in that way was refused "has no relying party pinned" at Set up signing, and could not enrol a console key at all. Fixes #377. An approved grant now pins the click's browser-attested origin to the community the link names, as the page-bridge logins pin theirs on approval: handleSignInStep does it on a done/approve, from the flow record (the origin the flow refused unless it was the portal the community's DID document names, VTI-LNK-105) and the link's `from`, parsed with now: 0 as the page-number relay does, so a link that lapsed while the person approved still names its community. The pin's other half is kept: a page that asks for a different relying party than it was pinned to gets a loud prompt. On prepare the background forwards what the origin is pinned to (pinnedDid); the flow adds changedFromDid to the confirm screen when the link's community differs; the window shows a danger note naming the previous community and no longer skips the confirm screen for a single identity in that case, so the warning is seen before anything is sent. bridge-protocol: pinnedDid on the offscreen prepare request, changedFromDid on the confirm result; both optional. page-task-policy is unchanged: no pin still means no signature. Signed-off-by: Geoff Turk <geoff@ic3.dev>
geoffturk
marked this pull request as draft
October 23, 2026 13:58
geoffturk
marked this pull request as ready for review
October 23, 2026 14:10
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.
Fixes #377.
The problem
A trigger-link sign-in (
auth/oob/*) is the first option on a VTC operator console's login page, and it was the only wallet sign-in that seeded no origin → relying-party pin (origin-pin.ts, M5). The console's Set up signing with your wallet callssignTrustTask, which is bound to that pin and deliberately never seeds one. So a wallet administrator who signed in the recommended way was refused with<origin> has no relying party pinned …and could never enrol a console signing key. Only the two page-bridge SIOP sign-ins, now labelled deprecated on that login page, left a pin.The change
background.ts). When a trigger-link flow ends with an approved grant,handleSignInSteppins the click's browser-attested origin to the community DID the link names, through the existingpinOrigin. That is the pairing the flow already verified: it refused unless that origin was the portal the community's own DID document names (VTI-LNK-105). The link is parsed withnow: 0, ashandleTriggerLinkNumberdoes, so a link that lapsed while the person was approving still names its community.preparethe background now forwards what the origin is currently pinned to (pinnedDid). The flow (sign-in-flows.ts) addschangedFromDidto the confirm screen when the link's community differs. The window (sign-in-view.tsx) shows a danger note naming the previous community and no longer skips the confirm screen for a single identity in that case, so the warning is seen before anything is sent.bridge-protocol.ts):pinnedDid?on the offscreen prepare request,changedFromDid?on the confirm result. Both optional and additive.changedFromDidonly when the pinned DID differs from the link's community, and a render test that the warning is shown, no claim goes out on its own, and Continue is offered.page-task-policy.tsis unchanged: no pin still means no signature.Judgment calls for the reviewer
from, rather than the flow returning the pairing it verified in itsdoneresult. This keepsSignInStepResult'sdoneshape stable and leaves fourdeepEqualassertions on it untouched. The two are equal by construction today (the flow'svtcDidislink.from.value, and it refuses unlessoriginmatches the portal), but if you would rather the flow report what it verified,donecould carry{ vtcDid, portalOrigin }on an approve and the background would pin from that instead. Happy to switch.Verification
Built with the Docker workflow from the working tree: lint,
tsc,npm test(1317 + 6 + 9 passing, the two new tests among them) and CI's post-build assertions all pass. The unpacked build loads with the pinned extension ID.Exercised end to end against a live VTC (
test-vtc.openvtc.net, operator console, adid:webvhpersona withcommunity-admin): after Sign in with your wallet the origin is pinned and Set up signing with your wallet succeeds, where the same steps on the previous build were refused withhas no relying party pinned.