From 6f9e6a3d98d2927bcc24e1adcfa2715763aad971 Mon Sep 17 00:00:00 2001 From: Jennie Robinson Faber Date: Thu, 16 Apr 2026 21:23:31 +0100 Subject: [PATCH] feat(events): guest accounts for public event registration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Non-members who register for an event now get a persistent identity: with consent, a status:"guest" Member is upserted and an auth cookie is set so the "You're Registered" state survives a page refresh. Tiered auto-login matches passwordless-auth norms — auto-login is only safe when the account holds no privileges: - New email → create guest + cookie - Returning guest → cookie - Existing non-guest (active/pending/etc.) → attach ticket only, no cookie, confirmation email includes a sign-in link Guests are gated on status === "guest", so admin/middleware code that keys on status === "active" naturally excludes them. Guests are also treated as non-members for ticket pricing/validation to prevent picking up member-only pricing on their second registration. --- app/components/EventTicketPurchase.vue | 39 +++++++++++++++ .../api/events/[id]/tickets/purchase.post.js | 48 +++++++++++++++--- server/models/member.js | 2 +- server/utils/auth.js | 20 ++++++++ server/utils/resend.js | 10 +++- server/utils/schemas.js | 3 +- tests/server/api/event-registration.test.js | 50 +++++++++++++++++++ 7 files changed, 162 insertions(+), 10 deletions(-) diff --git a/app/components/EventTicketPurchase.vue b/app/components/EventTicketPurchase.vue index 72be9f6..dc8a02b 100644 --- a/app/components/EventTicketPurchase.vue +++ b/app/components/EventTicketPurchase.vue @@ -154,6 +154,18 @@ securely

+ + +