RLS Authorized isn't working with custom JWT Token
I have built an app that using neon as a database along with Drizzle as the orm.
My app used to work fine before but now I get a TLS error:
I have tried multiple approaches to find a clue:
- I ensured drizzle wasn't the issue atleast without JWT. I can use neonclient with drizzle and it works with DATABASE_URL but when I add the token with the client it then gives the TLS error.
This is my code below for reference:
- I downgraded Postgres from 17 to 15 to check if that was the issue. but it didn't fix it.
- I then read in the document about the serverless driver from 1.0.0 was changing so I downgraded to 0.10.4 along with drizzle-orm from 0.44.1 to 0.39.1 but to no avail.
- My app is hosted on vercel and thought maybe that was the issue. So I spun up a deno app in cloudflare which didn't work too.
- Finally, I created a new neon project to test out if authenticated irl with token would work and still the issue presists.
My app used to work fine before but now I get a TLS error:
I have tried multiple approaches to find a clue:
- I ensured drizzle wasn't the issue atleast without JWT. I can use neonclient with drizzle and it works with DATABASE_URL but when I add the token with the client it then gives the TLS error.
This is my code below for reference:
- I downgraded Postgres from 17 to 15 to check if that was the issue. but it didn't fix it.
- I then read in the document about the serverless driver from 1.0.0 was changing so I downgraded to 0.10.4 along with drizzle-orm from 0.44.1 to 0.39.1 but to no avail.
- My app is hosted on vercel and thought maybe that was the issue. So I spun up a deno app in cloudflare which didn't work too.
- Finally, I created a new neon project to test out if authenticated irl with token would work and still the issue presists.
