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).
This commit is contained in:
1 parent
698bf13551
commit
1bffae9777
3 files changed
+81
-32
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user