Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’8mo agoβ€’
6 replies
Nishantv249

rls is bypassed when connecting to supabase using the connection string with postgres library

hi,

I have enabled RLS for a table, so I expect all requests to this table should be blocked, in sql editor I see this as blocked when role is selected as anon.

However, when connecting to supabase from my next.js app , with postgres library using the connection string, even adding param as role = anon, RLS is bypassed.

Even I have enabled RLS for superusers, but the table is accessible.

Can someone give insight, what I might be doing wrong?

Thanks
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

RLS not working when connecting using Database connection string with Drizzle ORM
SupabaseSSupabase / help-and-questions
4mo ago
Connection refused when connecting postgres and supabase to n8n
SupabaseSSupabase / help-and-questions
7mo ago
Connecting with connection string
SupabaseSSupabase / help-and-questions
4y ago
Connection string clarity when using Prisma
SupabaseSSupabase / help-and-questions
7mo ago