-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
Version 2.7.0 prevents reading data on web under certain conditions #1085
Comments
I'm pretty sure this is because on web session changes are broadcasted to other instances to affect other tabs. |
It looks like the refactoring PR (#1087) is not going anywhere anytime soon (please correct me if I'm wrong). Is that refactoring required to fix this issue? Or can this issue be fixed as a smaller change? |
@dshukertjr Since you don't want to merge #1087 to fix this issue. Do you prefer a different way to fix this issue? It's a bad design that two supabase clients can't be isolated properly. |
@Vinzent03 What exactly is the cause of this issue, and how does #1087 solve it? |
I haven't actually run this, but I'm pretty sure that when the test is run on chrome the following happens: By signing in on #1087 fixes this my moving the session persisting to the gotrue client (like in auth-js) and only if the client persists the session (off by default), the session is broadcasted to other clients. With default parameters, the session is only broadcasted when using |
Describe the bug
Under certain conditions a client with a service role key can not circumvent RLS policy restrictions on web.
To Reproduce
Add the following code to a flutter project:
Create a table "session_events" that has an RLS policy preventing everyone from reading it.
Run the test on Linux with
flutter test -d linux integration_test
and on Chrome withflutter drive --driver=test_driver/integration_test.dart --target=integration_test/supabase_test.dart -d web-server --browser-name chrome --no-headless
. Make sure to first start ChromeDriver on port 4444.Observed behavior
Version (please complete the following information):
The text was updated successfully, but these errors were encountered: