Replies: 8 comments 14 replies
-
Unless it broke in the last couple of days, and I’ve seen no reports of that (assuming you also asked this same thing on discord) , it works with RLS on hosted. One thing you could check is if it sends a user or anon token in the websocket message. |
Beta Was this translation helpful? Give feedback.
-
Hey gary, thanks for your response! I do really have no clue why it's not working, I've checked the websocket, it sends the anon token as user_token, the server responses correctly, the subscription get's added to the database with the anon role set. I can do CRUD operations just fine with the anon token for the desired table in the public schema.
|
Beta Was this translation helpful? Give feedback.
-
Realtime + RLS only working in DELETE event |
Beta Was this translation helpful? Give feedback.
-
I have a similar issue with the Flutter SDK. No matter what I try, as soon as I enable RLS (even with the 'Enable read access for all users' template policy enabled) no realtime updates are received anymore. I can still see the authenticated subscription in the As soon as I disable RLS, realtime starts working again. |
Beta Was this translation helpful? Give feedback.
-
@skizer are you still having Realtime issues? |
Beta Was this translation helpful? Give feedback.
-
@w0wka91 I am facing same problem |
Beta Was this translation helpful? Give feedback.
-
I was also having an issue with RLS not working as expected when combined with the Realtime API on a Supabase hosted instance. Adding this line fixed the problem for me:
|
Beta Was this translation helpful? Give feedback.
-
@huyouare just came here to say that you are a gentleman and a scholar, this fixed it for me. |
Beta Was this translation helpful? Give feedback.
-
Hey folks,
after reading tons of discord messages and old issues on github it seems like there's something wrong with the hosted instance of supabase in correlation with Realtime + RLS.
Access is all granted via policy, socket gets created and connects and the realtime->subscription table gets populated with the subscription.
According to the latest blog post, the hosted version of supabase supports RLS+Realtime, am I wrong?
I've struggled a bit with a fairly simple scenario for a while now until I found the official blog post where they've announced that RLS now also affects the real-time subscription feature.So with the RLS in effect for subscriptions, is it even possible now to notify subscribers (anon for example) on things like DELETE and UPDATE even tho they only have permission for SELECT?Beta Was this translation helpful? Give feedback.
All reactions