Owner/Auth-based RLS Policy always fails

I added a RLS Policy to allow a user to only insert if the owner_id is themselves:

alter policy "Enable insert for users based on user_id"
on "public"."memories"
to public
with check (
  (( SELECT auth.uid() AS uid) = owner_id)
);


I try to insert a row with my currently-authenticated User ID from the Supabase SDK and getting:
new row violates row-level security policy for table "memories"

I even tried to hard-code it to the only person ID in the auth table: 89258579-eb05-48d0-b74d-87ad6f790c32
Am I missing anything? Thanks!
Screenshot_2025-01-27_at_9.32.07.png
Was this page helpful?