6 Replies
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.
console log: ❌ Supabase connection error: Error: permission denied for table users


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
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.
I think your grants are messed up. Try this first https://github.com/orgs/supabase/discussions/35757#discussioncomment-13195266
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