Clerk + Neon RLS configuration
Hello, I have setup Clerk with Neon/Drizzle but am getting RLS errors in production when I enable RLS on the Users table:
Can someone please advise how I can resolve this issue?
Thank you!
2 Replies
stuck-chocolate•8h ago
Hey!
Have you added the
pg_session_session
extension? And have you set up your JWKS URL in the Neon Console?
This doc might be handy to you for setting up RLS with Neon Auth : https://neon.com/docs/guides/neon-rls-clerkNeon
Secure your data with Clerk and Neon RLS - Neon Docs
Clerk + Neon RLS Neon RLS Tutorial Manual JWT verification Simplify RLS with Drizzle Use Clerk with Neon RLS to add secure, database level authorization to your application. This guide assumes you alr...
deep-jadeOP•7h ago
Hi Sam, yes I've added the JWKS URL from Clerk (generated using their JWT template for Neon)
Let me double check regarding the
pg_session_session
extension
I have these 2 configured on the Neon branch:
I see it says: "Neon RLS is available only in private preview. Contact Support if you'd like to use it." in the docs, do I need to take any additional steps to turn RLS on in my database? I've raised a support ticket but not sure what the status of it is