Repository navigation
Add the rotating invite-only ticket core - #1
Open
instilllive wants to merge 1 commit into
Open
instilllive wants to merge 1 commit into
instilllive wants to merge 1 commit into
Conversation
Named guest tickets, host-approved transfers, and a 5-second HMAC door code that admits once. Includes the host, guest, and door pages, vitest coverage, a local demo, and CI for typecheck and tests. Co-authored-by: instilllive <instilllive@users.noreply.github.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.
Step 1 of a private, invite-only ticketing app. No payments, resale, guest messaging, or production deploy.
A host token from the environment creates events and issues named tickets. Each ticket has a server-side 32-byte secret. The guest page shows a QR whose payload is
ticket_id, the 5-second step, and a truncated HMAC-SHA256. The door accepts the current step and one step of clock skew, rejects a code from 3 steps ago (~15s), rejects a tampered tag, a revoked ticket, and the wrong event, and checks the ticket in once. A transfer does nothing until the host approves it; approval replaces the secret and the guest link.Tests
npm run typecheckpassed (tsc --noEmit, no errors).npm test(vitest 3.2.7):Coverage includes rotation each step (injected clock and fake timers), one-time admit, replay, a code from 3+ steps ago, a tampered HMAC, revoked tickets, the wrong event, a transfer that changes nothing until approval, old codes dying after approval, and a real multi-connection double-scan.
Demo
npm run demo:UI check
In Chrome: create an event, issue a ticket, watch the guest QR rotate to a new payload after one step, request a transfer (name and code unchanged), approve it (old link 404s, new guest gets a new code), scan that code (
ADMIT), scan it again (REJECTED/ already used), and revoke from the guest list. The door camera reports permission denied in headless Chrome and the paste field still works. The guest page does not overflow at 390px wide.