Skip to content

RLS Realtime role apparently not set / Walrus #29542

Open
@fullstackwebdev

Description

@fullstackwebdev

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 : supabase/realtime#1113

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions