Admin password login + attendee profile self-service

- contacts.password: admin-only APPE Admin login password (event-independent);
  must match the bcrypt hash in auth.users.encrypted_password (set in Supabase).
- APPE Admin login is now email + password (was QR token).
- update_my_profile RPC (security definer, scoped to current_email()): attendees
  set their LinkedIn URL + show_email / show_linkedin toggles from the Profile.
- Convivo Profile gains a 'Profile settings' card (LinkedIn + 2 toggles + Save).
- Visibility enforced server-side in the public projection (linkedin nulled when
  show_linkedin off, email omitted when show_email off).
- Seed: admin password appe-admin-2026; staff keep QR tokens as auth passwords.
- Docs updated (schema, rpcs, seed, admin-app, screens, api-client,
  architecture, next-steps, README, docker-compose).
This commit is contained in:
Lago committed 2026-08-23 14:11:26 +02:00
1 parent b52d8ab007
commit 8b1130f078
19 files changed
+290 -59

No files matched your search

+8 -2
View File
@@ -127,8 +127,14 @@ the work atomically, and the `leaderboard` table change fans out over Realtime.
## 6. Authentication model
- The **QR token is the Supabase Auth password**; the **email is the identifier**.
Login is a standard `signInWithPassword({ email, password: qrToken })`.
- **Attendees & staff:** the **QR token is the Supabase Auth password**; the
**email is the identifier**. Login is a standard
`signInWithPassword({ email, password: qrToken })`.
- **APPE Admin:** logs in with **email + a real password** (event-independent, so
it works for any event). The password is recorded in `contacts.password` and
must match the bcrypt hash in `auth.users.encrypted_password`. It is set
directly in Supabase (no self-service UI). Staff can also open the admin app
with their email + QR token, since that is their 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