realtime icon indicating copy to clipboard operation
realtime copied to clipboard

RLS Realtime role apparently not set / Walrus

Open fullstackwebdev opened this issue 1 year ago • 4 comments

Bug report

  • [ X] I confirm this is a bug with Supabase, not with my own application.
  • [ X] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

because supabase auth doesn't support multiple oauth, I need to use next-auth next-auth allows me to set supabaseToken in my request, this works for client and server this also appears to work fine with real time, however my problem: I get no records for INSERTS or UPDATES when RLS is enabled I do have however get DELETE events.

If I disable RLS, I get all records, but my table is wide open to the world.

I believe the issue is that on the postgres server receiving the auth token it is not correctly setting the authenticated role in the SQL connection. In postgraphile I can showyou where this is done, however, I cannot find it in your codebase.

Or it could be complete unrelated issue causing my problems.

Expected behavior

I should see RLS events for INSERT, UPDATE based on the role or at least something besides delete

similar if not the same as : https://github.com/supabase/realtime/issues/1113

fullstackwebdev avatar Sep 26 '24 16:09 fullstackwebdev

same issue here.

rogaha avatar Oct 31 '24 10:10 rogaha

any updates?

rogaha avatar Nov 01 '24 15:11 rogaha

Hi, I've moved this issue over from the supabase repo to the realtime repo as its more realtime related.

Hallidayo avatar Mar 22 '25 17:03 Hallidayo

looks a bit more like #1114 ?

lmgarret avatar Sep 03 '25 14:09 lmgarret