You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I found an really annoying bug.
The code below is only working if I change the RLS policy inside supabase to "read access for everyone".
But if i make a standard authentication check policy like "(auth.uid() = user_id)" it won´t work and I won´t get any update informations on client.
Database reading with the "standard auth policy" is working fine, like "read access for everyone policy" does btw.
I think the client variable is not passing some auth informations to server probably?
Before executing the function below, the user signes in of course.
var client : RealtimeClient
var channel : RealtimeChannel
func _getChangesFromServer():
client = Supabase.realtime.client()
client.connected.connect(Callable(self, "_onConnectedToFriendChat"))
client.connect_client()
func _onConnectedToFriendChat():
var userID : String = userData[0]["id"]
channel = client.channel("public", "friends", "user_id=eq." + userID)
channel.update.connect(Callable(self,"_onFriendChatUpdate"))
channel.subscribe()
func _onFriendChatUpdate(old_record : Dictionary, new_record : Dictionary, channel : RealtimeChannel):
print("New Record updated from ", JSON.stringify(old_record), "to ", JSON.stringify(new_record), " on ", channel.topic)
For now I am using a filter to get only data which the user should have access to ("user_id=eq." + userID) but security-wise it´s a mess..
Hope someone could help out!
The text was updated successfully, but these errors were encountered:
Hi guys,
I think I found an really annoying bug.
The code below is only working if I change the RLS policy inside supabase to "read access for everyone".
But if i make a standard authentication check policy like "(auth.uid() = user_id)" it won´t work and I won´t get any update informations on client.
Database reading with the "standard auth policy" is working fine, like "read access for everyone policy" does btw.
I think the client variable is not passing some auth informations to server probably?
Before executing the function below, the user signes in of course.
For now I am using a filter to get only data which the user should have access to ("user_id=eq." + userID) but security-wise it´s a mess..
Hope someone could help out!
The text was updated successfully, but these errors were encountered: