RLS insert still failing for anon role even with correct policy
I’m trying to submit a booking form from my frontend to a Supabase table bookings with RLS enabled. I’ve created the following policy:
which grants:
pg_policies confirms the policy is PERMISSIVE and exists for the anon role, and my call to a debug_auth() function shows:
So I KNOW I'm using the anon role. this is what the frontend code to insert looks like:
example contents of bookingData (to be submitted:
and finally the issue i am facing when trying to submit:
ANY help would be appreciated. It should be noted that this all works if i disable RLS, but I dont think thats a good idea for many reasons.
which grants:
pg_policies confirms the policy is PERMISSIVE and exists for the anon role, and my call to a debug_auth() function shows:
So I KNOW I'm using the anon role. this is what the frontend code to insert looks like:
example contents of bookingData (to be submitted:
and finally the issue i am facing when trying to submit:
ANY help would be appreciated. It should be noted that this all works if i disable RLS, but I dont think thats a good idea for many reasons.