Why auth.uid() returns NULL in a Supabase RLS policy
TL;DR: auth.uid() returns NULL whenever no user JWT reaches Postgres. The two culprits, in order: you're testing the policy in the SQL editor (which runs as the privileged postgres role with no JWT),
guardlayer.hashnode.dev10 min read