Security
Current Security Boundary
- Supabase verifies identity
- the API decides authorization
- tenant IDs come from the URL path and server-side claims
- admin email domains are enforced server-side
- webhook signatures are verified before processing
- OAuth tokens are encrypted at rest
Important Invariants
- UI route guards are not security boundaries.
- Tenant-scoped queries must filter by tenant.
- Reward and wallet updates must stay transactional.
- Admin actions must be audited.
- Provider secrets must never be logged.
Written byDhruv Doshi