S
Supabase2w ago
CG2X

RLS doesn't work with Anon

No description
No description
6 Replies
CG2X
CG2XOP2w ago
I gave read access to anon role with RLS turned on. But in my app, I get permission denied. I have double checked to make sure that the url and anon key is correct.
CG2X
CG2XOP2w ago
console log: ❌ Supabase connection error: Error: permission denied for table users
No description
No description
CG2X
CG2XOP2w ago
After running GRANT SELECT ON TABLE public.users TO anon; , I can select. But even after removing the policy (with access granted still), it still lets me select which it shouldn't. console log: ✅ Supabase connection successful
No description
CG2X
CG2XOP2w ago
I don't think this is the intended behavior. Please help. Thanks! For extra information, even with RLS disabled, I still get permission denied when using anon.
inder
inder2w ago
CG2X
CG2XOP2w ago
Yep that fixed it thanks a lot! Lol i think it's because i ran a DROP SCHEMA public CASCADE; thinking that grants would be restored automatically

Did you find this page helpful?