diff --git a/web/components/screens/DoorScreen.tsx b/web/components/screens/DoorScreen.tsx index 627531b..0c3fa90 100644 --- a/web/components/screens/DoorScreen.tsx +++ b/web/components/screens/DoorScreen.tsx @@ -9,6 +9,7 @@ import { EMAIL_ENABLED, ENOKI_ENABLED, PACKAGE_ID, TICKET_TYPE } from "@/lib/con import { useAllEvents } from "@/lib/events"; import { checkInTx, getFields } from "@/lib/ticketing"; import { humanizeError } from "@/lib/moveErrors"; +import { getTurnstileToken } from "@/lib/turnstileClient"; import { clearStaffKeypair, extractTicketId, @@ -498,10 +499,11 @@ function AdmitPanel({ eventId, onAdmitted }: { eventId: string; onAdmitted: () = if (!em) return; setLookupBusy(true); try { + const turnstileToken = await getTurnstileToken(); const r = await fetch("/api/identity/lookup-email", { method: "POST", headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ email: em }), + body: JSON.stringify({ email: em, turnstileToken }), }); const j = (await r.json()) as { address?: string | null; error?: string }; if (!r.ok) throw new Error(j.error || "Lookup failed"); diff --git a/web/components/screens/EventManageScreen.tsx b/web/components/screens/EventManageScreen.tsx index f2d75ad..c907ce7 100644 --- a/web/components/screens/EventManageScreen.tsx +++ b/web/components/screens/EventManageScreen.tsx @@ -55,6 +55,7 @@ import { EV_EMAIL_GRANT_CREATED } from "@/lib/identity"; import { createSessionKey } from "@/lib/seal"; import { useSignPersonalMessage, decryptAttendeeEmail } from "@/lib/emailBinding"; import type { ProfileEnvelope } from "@/lib/profile"; +import { getTurnstileToken } from "@/lib/turnstileClient"; import { useAllEvents } from "@/lib/events"; import { useEventMarkets } from "@/lib/markets"; import { @@ -822,10 +823,11 @@ function OrganizerEmailCheckinCard({ ctx }: { ctx: DeckCtx }) { if (!em) return; setBusy(true); try { + const turnstileToken = await getTurnstileToken(); const r = await fetch("/api/identity/lookup-email", { method: "POST", headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ email: em }), + body: JSON.stringify({ email: em, turnstileToken }), }); const j = (await r.json()) as { address?: string | null; error?: string }; if (!r.ok) throw new Error(j.error || "Lookup failed");