Convivo login: staff QR asks for staff password (not email)

When a staff QR is detected, the confirm step now shows a password field
instead of the email field. Login uses the resolved contact's email + the
entered staff password (signInWithPassword). Attendees are unchanged (QR +
ticket email). Docs updated (screens.md, architecture.md).

Co-authored-by: Stephan Charles <[email protected]>
Co-authored-by: Amelia Hernandez <[email protected]>
Co-authored-by: Markus Franz <[email protected]>
Co-authored-by: Sabrina Hota <[email protected]>
Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
committed 2026-08-23 19:18:59 +02:00
1 parent 5886de9d19
commit adcbb507e9
3 files changed
+81 -32

No files matched your search

+9 -8
View File
@@ -127,16 +127,17 @@ the work atomically, and the `leaderboard` table change fans out over Realtime.
## 6. Authentication model
- **Attendees & staff:** the **QR token is the Supabase Auth password**; the
**email is the identifier**. Login is a standard
- **Attendees:** the **QR token is the Supabase Auth password**; the **email is
the identifier**. Login is a standard
`signInWithPassword({ email, password: qrToken })`.
- **APPE Admin / staff:** can log in with **email + a real password**
(event-independent, so it works for any event). The password is recorded in
`contacts.password`; a trigger (`trg_contact_password_sync`) **auto-syncs** it
as the bcrypt hash in `auth.users.encrypted_password`, so setting it in the
- **Staff:** log in with **QR + their admin password** (event-independent). In
the Convivo app, scanning a staff QR shows a **password** field (not the email
field); the email is taken from the resolved contact. The password is recorded
in `contacts.password`; a trigger (`trg_contact_password_sync`) **auto-syncs**
it as the bcrypt hash in `auth.users.encrypted_password`, so setting it in the
Supabase Table Editor makes it work with `signInWithPassword` immediately.
Staff can also still log in with their email + QR token (their seeded Auth
password).
(Staff can also still log in with their email + QR token, their seeded Auth
password.)
- `enable_confirmations = false`, so **no email is sent** — the email is only a
"confirm it's you" check against the ticket purchase.
- After login, the app holds a **session JWT** (in `localStorage`) that lasts