Open Pavel-Demidyuk opened 1 month ago
Could you please provide the version of your PostgreSQL? I recommend trying to downgrade to "postgres": "^3.3.5" as I came across this solution somewhere.
Could you please provide the version of your PostgreSQL? I recommend trying to downgrade to "postgres": "^3.3.5" as I came across this solution somewhere.
@Kiranism, thank you for the suggestion. Here is the version of PostgreSQL that I had specified in my package.json:
"pg": "^8.12.0"
Following your recommendation, I downgraded it to 3.3.5. I encountered some conflicts with the @auth/pg-adapter module during the downgrade, which I resolved by using the --force option. Unfortunately, I'm still facing the same issue; the error remains unchanged.
Following your recommendation, I downgraded it to 3.3.5. I encountered some conflicts with the @auth/pg-adapter module during the downgrade, which I resolved by using the --force option. Unfortunately, I'm still facing the same issue; the error remains unchanged.
Oh, that's unfortunate. Kindly revert back then. Another way is to try using Vercel/Postgres.
I hope you went through this doc. https://authjs.dev/getting-started/adapters/pg
I hope you went through this doc. https://authjs.dev/getting-started/adapters/pg
got it, will try, thanks @Kiranism!
Ok, I think I found it. The issue is that middleware.ts can't use any database staff, since it's running on the client side. It needs to be refactored, and one of the possible ways is described here.
Hi!
First of all, thank you for the amazing repository! The demo looks perfect.
I'd like to add a PostgreSQL adapter to store user data in the database but I'm unsure how to accomplish this. Directly adding the adapter to
authConfig
doesn't seem to work, as it appears to be rendered on the client side from what I understand. Here is the current config that isn’t working, located inauth.config.ts
:Here is the error I'm receiving: