Feature: presigned team invites (one-click join) #126
Loading…
Reference in a new issue
No description provided.
Delete branch "lex00/presigned-invites"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Brought over from https://github.com/lex00/illogical/pull/1 by @lex00 (branch
integration, commits unchanged).Adds presigned team invites to illogical control. An owner makes a link, the invitee presses Join once, and they're in, with no approval step afterwards. Control still can't add anyone by itself.
How it works
#fragmentand never reaches control.v: 2): the previous members plus themselves, the invite marked spent, and the one-time key's signature over exactly that member and version.Roster::followsaccepts that from a non-owner. Control, daemons and browsers all run the same check, and control can't move the proof to an account of its own.features=presigned-invites, and control only makes a presigned link when every daemon checking the team (its own machines, plus ones a session was shared with) has reported it. Otherwise the owner gets an Ask-me-first link and a note naming the machines to update.Changes
crates/e2e/src/team.rs:Invite,Spent,Redeem, v2 bodies, the redeem rule, unit testsweb/src/e2e/team.ts: the same rule in TypeScript;e2e-interopchecks Rust and TS agreecrates/control:presigned_invitesanddaemon_watchestables, adaemons.featurescolumn,/api/presigned/..., the version gate, a push to owners after someone joinscrates/daemon/src/control.rs: reports features on team callsweb/src/control.ts,web/src/ui/control.tsx: link creation with fallback, one-click join promptdocs/teams.md,docs/control-e2e.mdTests
cargo fmt --check,clippy -D warnings, workspace unit tests,just e2e-interop,just control-smoketeams,control,passkey,fleet-control,team-swarm,team-answersattention::failures_and_long_builds_say_what_happenedand team-answers' service-worker testNot done
at, which the invitee writes. Control enforces expiry with its own clock, but a daemon can't independently.🤖 Generated with Claude Code
An owner's device signs an invite (team, role, expiry, a one-time Ed25519 key) when it makes the link; the key's private half lives only in the link's fragment. The invitee's device writes the next roster version (v2): the previous members plus themselves, the invite marked spent, the one-time key's signature over exactly that member and version. Roster follows() accepts that from a non-owner; control, daemons and browsers all check it, and control can't move the proof to an account of its own. - crates/e2e: Invite, Spent, Redeem; v2 bodies; the redeem rule + tests - web/src/e2e/team.ts: the same rule, one-time keys, redeemInvite; e2e-interop checks Rust and TS agree on redeemed and tampered rosters - control: presigned_invites table; invite stores a signed invite; /api/presigned/{team}/{key} (+ /preview); set_roster takes a redeem once, not after a lock, for the signed-in account, and pushes owners - web UI: presigned by default, "Ask me first" keeps the old flow (and owner invites); PresignedPrompt joins in one click; owner edits carry spent invites forward until they expire - e2e: someone already in a team joins a second one in one click, the team box takes the new roster, and the link works once - docs: teams.md, control-e2e.md Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>Review fixes pushed on top of lex00's commits (
11b396d,3410a6a):#fragment, one-time key included, to control in?next=. The seed now waits in sessionStorage. Presigned links use#pinvite=, so older cached pages never send the seed as an ask-first code. The e2e signs a signed-out invitee in from the link and checks no request carries the seed.atcan't be before the previous version's. The browser checks well-formedness as Rust does, and e2e-interop covers the new cases. Control also checks that the new member's root is the account's own.Verified, merged into current main:
just checkand 30 Playwright tests (teams, control, passkey, fleet-control, team-swarm, team-answers, fountain). Not done: cancelling a single outstanding link.Also left open, besides cancelling a single link:
illogical has moved to GitHub, with the same numbers: this PR continues as https://github.com/arugula-salad/illogical/pull/126 (same branch,
lex00/presigned-invites). Closing it here.