I have a table with proper RLS policies set up and I'm using the stream function (stream docs) to show a list and keep up with changes.
This was all working great. Later, when I began using realtime broadcasts for other features, I decided I didn't want to allow public realtime connections so I went to the realtime settings and changed the "Allow public access to channels" options to False. Changing this connection immediately broke my stream function with the following error:
RealtimeSubscribeException(status: RealtimeSubscribeStatus.channelError, details:
Exception: "PrivateOnly: This project only allows private channels")
According to the documentation here, the private setting shouldn't affect Postgres Changes (since those use the RLS policies of the table being watched, not realtime.messages). Perhaps I'm misunderstanding, but I thought the stream function used Postgres Changes under the hood since I'm not setting up any broadcast triggers or anything like that.
So if I'm not mistaken, I don't see why disabling public realtime channels would break the stream function.
My user is definitely signed in and has proper RLS access, since once I enable public access again, I can create, view, and delete records just fine.
Is this a bug, or am I misunderstanding how the stream function works?
I have a table with proper RLS policies set up and I'm using the
streamfunction (stream docs) to show a list and keep up with changes.This was all working great. Later, when I began using realtime broadcasts for other features, I decided I didn't want to allow public realtime connections so I went to the realtime settings and changed the "Allow public access to channels" options to False. Changing this connection immediately broke my stream function with the following error:
According to the documentation here, the private setting shouldn't affect Postgres Changes (since those use the RLS policies of the table being watched, not realtime.messages). Perhaps I'm misunderstanding, but I thought the
streamfunction used Postgres Changes under the hood since I'm not setting up any broadcast triggers or anything like that.So if I'm not mistaken, I don't see why disabling public realtime channels would break the
streamfunction.My user is definitely signed in and has proper RLS access, since once I enable public access again, I can create, view, and delete records just fine.
Is this a bug, or am I misunderstanding how the
streamfunction works?