Use the signed-in user across your backend
Postgres policies, function handlers and storage policies all receive the same user ID. Each layer keeps its own rules, and every rule checks the same person.
- Postgres policies read auth.uid()
- Functions receive event.__volcano_auth.user_id and role
- Storage policies check the user against a file path
# access token for user 8f1c…postgres auth.uid() → 8f1c… 12 of 1284 rowsfunction __volcano_auth.role → authenticatedstorage 8f1c/report.pdf allowed · 9a2b/… refusedno permission code in between

