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!
query: 'select "id", "clerkId", "firstName", "lastName", "email", "role", "analyticsEnabled", "errorMonitoringEnabled" from "User" where "User"."clerkId" = $1',
params: [Array],
[cause]: Error [NeonDbError]: Server error (HTTP status 500): "{\"message\":\"could not set up the JWT authorization database extension\",\"code\":\"\",\"detail\":null,\"hint\":null,\"position\":null,\"internalPosition\":null,\"internalQuery\":null,\"severity\":\"\",\"where\":null,\"table\":null,\"column\":null,\"schema\":null,\"dataType\":null,\"constraint\":null,\"file\":null,\"line\":null,\"routine\":null}"
at bv.execute (.next/server/chunks/6880.js:30:3757)
at async (.next/server/chunks/6880.js:2:12144)
at async p.queryWithCache (.next/server/chunks/6880.js:34:10323)
at async p.execute (.next/server/chunks/6880.js:2:12101)
at async (.next/server/app/api/trpc/[trpc]/route.js:8:70264)
at async bI.middlewares (.next/server/app/api/trpc/[trpc]/route.js:5:7696)
at async bM (.next/server/app/api/trpc/[trpc]/route.js:8:69)
at async b (.next/server/app/api/trpc/[trpc]/route.js:5:7932)
at async (.next/server/app/api/trpc/[trpc]/route.js:1:36558) {
severity: undefined,
code: undefined,
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: undefined,
line: undefined,
routine: undefined,
sourceError: undefined
}
} query: 'select "id", "clerkId", "firstName", "lastName", "email", "role", "analyticsEnabled", "errorMonitoringEnabled" from "User" where "User"."clerkId" = $1',
params: [Array],
[cause]: Error [NeonDbError]: Server error (HTTP status 500): "{\"message\":\"could not set up the JWT authorization database extension\",\"code\":\"\",\"detail\":null,\"hint\":null,\"position\":null,\"internalPosition\":null,\"internalQuery\":null,\"severity\":\"\",\"where\":null,\"table\":null,\"column\":null,\"schema\":null,\"dataType\":null,\"constraint\":null,\"file\":null,\"line\":null,\"routine\":null}"
at bv.execute (.next/server/chunks/6880.js:30:3757)
at async (.next/server/chunks/6880.js:2:12144)
at async p.queryWithCache (.next/server/chunks/6880.js:34:10323)
at async p.execute (.next/server/chunks/6880.js:2:12101)
at async (.next/server/app/api/trpc/[trpc]/route.js:8:70264)
at async bI.middlewares (.next/server/app/api/trpc/[trpc]/route.js:5:7696)
at async bM (.next/server/app/api/trpc/[trpc]/route.js:8:69)
at async b (.next/server/app/api/trpc/[trpc]/route.js:5:7932)
at async (.next/server/app/api/trpc/[trpc]/route.js:1:36558) {
severity: undefined,
code: undefined,
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: undefined,
line: undefined,
routine: undefined,
sourceError: undefined
}
}Can someone please advise how I can resolve this issue?
Thank you!






