Jasper
 · Hobby Builder

Is the built in Supabase query using JWT?

Database & APIs

I'm using the regular FF UI CRUD for Supabase and I'm running into RLS issues that seem to be JWT related...

I just want to insert a row into a table if the user is authenticated. Seems pretty simple. Here is the policy I created:

CREATE POLICY "Allow insert for authenticated users"
ON public.tenants
FOR INSERT
WITH CHECK (current_setting('jwt.claims.role') = 'authenticated');

I'm not worried about matching the UUID as it's for a new tenant insert at signup but this should allow any authenticated user to insert into this table but I can't get it working.

Any tips would be greatly appreciated!





What have you tried so far?

Disabled RLS and the rows are created fine.

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