Skip to content

Feature/191 checkin token system - #196

Merged
3 commits merged into
mainfrom
feature/191-checkin-token-system
Aug 19, 2026
Merged

Feature/191 checkin token system#196
3 commits merged into
mainfrom
feature/191-checkin-token-system

Conversation

@Wuuuuu5

@Wuuuuu5 Wuuuuu5 commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • Adds src/services/supabase-admin.ts — a server-only Supabase client using the service role key (never exposed to the browser, guarded with server-only)
  • Adds POST /api/admin/checkin/generate — admin-only route (reuses the existing wallet-signature auth pattern from api/admin/approve) that:
    • generates a random token and stores only its SHA-256 hash — raw token is never persisted
    • generates an 8-char short backup code for typed check-in
    • sets a 2-minute expiry
    • revokes any still-active token for the event before inserting a new one, so at most one valid token exists per event
    • resolves the admin's wallet address to their public_profiles.id for audit columns (issued_by/revoked_by)
  • Wires the admin QR generator (admin/page.tsx) to call this route and render the real returned token + short code + expiry, replacing the earlier fake client-side token from the QR branch this builds on

@rebeccafitzpatr rebeccafitzpatr closed this pull request by merging all changes into main in f27ad02 Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants