-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supabase Realtime React Native silently fails when loading session from storage and using RLS/JWT #278
Comments
Could you open a support ticket so we can analyse this issue in more detail? |
Ticket ID is 2538336802 |
Hello, is there any progress on this issue yet? On Supabase.com I'm able to impersonate my authenticated user with the inspector and listen to events with no problem. On localhost, it appears to think my authenticated user is still anonymous despite non-realtime data loading without issue. Only changing the RLS policy makes realtime functional on localhost. |
oof just spent a bunch of time debugging this as well – support ticket 2879712393 is a one-sided journey to the exact same conclusion. I believe the issue was caused by #273 – in my testing, the problem is that the we were able to implement with the workaround, but seems like a good thing to fix! |
Can confirm this issue, manually setting the auth token using |
same issue here. using |
got it working now. |
@rogaha What fix caused you to be able to resolve this issue? Just using |
Bug report
Describe the bug
Supabase Realtime React Native silently fails when loading session from storage and using RLS that relies on supabase JWT claims.
Subscribing to postgres changes reports ok be receives no updates if the session is loaded from storage. Logging out and back in resolves the issue.
SUBSCRIBED and CLOSED events occur as expected. Logging realtime events at
info
show the same events in either case with the exception of the expected.Disabling RLS immediately fixes the issue and reenabling immediately re-triggers it.
RLS policy is checking a property on the JWT so this appears to be the issue.
Setting the Realtime auth token manually via
resolves the issue.
Expected behavior
Sessions loaded from storage or newly logged in should be able to use properties of the supabase jwt without manually setting.
Additional context
This is a regression as at some point previously this workaround was not required with the same RLS polices
Auth options are
Versions:
The text was updated successfully, but these errors were encountered: