Service Role does not work well in production. #27377
-
I am using remix 2.8.1 What am I doing:
What happens:
Things I have tried
Things I have not tried:
My questions is
Any help is welcomed. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
You use a supabase.js client for service_role. It needs to be a separate client from any auth-helpers/SSR clients. If for some reason you share the service role client with a user session then it is no longer service role. |
Beta Was this translation helpful? Give feedback.
-
+1 Also encountering somewhat of the same issue when using service role client configuration to make admin calls in production. Unsure if it's fully related but figured I'd post in case my data point helps. My db call looks something like this:
It works locally using the anon_key/service_role_key generated by the |
Beta Was this translation helpful? Give feedback.
Well what a turn of events I just have been laid off and this was my first and only persistent issue that indirectly contributed to it.
Not looking for blaming anyone or anything just letting it out, sorry if it sounds that way.
I do love supabase and will continue to use in my future projects, not sure what to do with this issue since now I can't fix it. So let me know if I should close it and I will.
I will move forward!