The same token, three enforcement points
Volcano installs auth.uid(), auth.email(), auth.role() and auth.is_authenticated() into every database, hands functions a verified identity on the event, and exposes the same helpers to storage policies. Authorization gets written once, in the layer that holds the data.
- Postgres: policies filter rows with auth.uid()
- Functions: event.__volcano_auth carries user_id and role
- Storage: the same helpers decide who can read a 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

