Supabase API Call with RLS enabled

Database & APIs

How can I perform an API call in FlutterFlow, when RLS is enabled for Supabase tables?

The Response & Test returns success (200), but now rows are returned. []

How do I pass the authenthicated user (logged in user) to the API call?

Do you have a complete example with all required headers, vars etc. ?

My policy on public table "project" looks like that:

alter policy "Allow all"
on "public"."project"
to authenticated
using (
  (auth.uid() = user_id)
);

I tried to pass user_id as query param, but then I got an error: "code": "PGRST100"
(see image below)


Best regards

What have you tried so far?

I tried to pass user_id as query param, but then I got an error: "code": "PGRST100"
(see image below)

Did you check FlutterFlow's Documentation for this topic?
Yes
3
1 reply