If your policy is changed to `(auth.role()::TEXT =...
# help
s
If your policy is changed to
(auth.role()::TEXT = 'authenticated')
, does it work then?
g
Hey, just replied to you, i found the issue after all.
Super thanks! I shared the solution in the channel
s
Cool. For reference in case anyone else comes looking for the solution: "Ok, found the issue. For whoever might face it. Supabase in order to insert, needs to also have a select permission to the Policy. Otherwise it wont work. If u dont want to add a select policy, simply add this to your insert statement insert(data, { returning: 'minimal' })" (https://discord.com/channels/839993398554656828/843999948717555735/875043429304909845)
g
Amazing! Btw do u work at supabase?
s
Nope, just a huge fan of the product because it's better than the competition 🙂
g
So true! Saves so much time for be stuff and gives a lot of flexibility. Im thinking about building my new saas startup with supabase, but what if they fuck up and disappear? 😛
s
Yeah, that's definitely a risk with any startup. I hope they don't disappear, but the fact it's all open source (except the dashboard, though there's progress being made in that area too) means self-hosting is always an option.
g
hosting yeah, but if they go away all authentication and db schemas go away
but still, any startup has risks!
Im trying to decide between firebase n supabase. Supabase is way more flexible, but its more risky i guess
s
You used to be able to dump the auth schema in some older Supabase projects, but that's no longer possible from what I can see. It might still be possible to dump the auth data though. You can still dump the public schema and data, and import it to a new server.
g
Yeah probably, u are right. Thank god its open source haha
are u involved with startup projects as well?
s
A few, but all of them are closed-source commercial contracts with clients. Some startups, some established.
g
Thats cool! Here is my linkedin if u wanna connect there too