-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no pg_hba.conf entry for host #822
Comments
Please use the issue template when reporting an issue. This does not sound like an issue with NextAuth.js. |
I used the database configuration object and added the following object and it works.
I don't know if it's the correct way to handle it. |
Hi there! It looks like this issue hasn't had any activity for a while. It will be closed if no further activity occurs. If you think your issue is still relevant, feel free to comment on it to keep it open. (Read more at #912) Thanks! |
Hi there! It looks like this issue hasn't had any activity for a while. To keep things tidy, I am going to close this issue for now. If you think your issue is still relevant, just leave a comment and I will reopen it. (Read more at #912) Thanks! |
Ahh OK @arnaudjnn 's solution worked for me! I was using a postgres db on heroku's free tier, and getting this pg_hba.conf error Just to clarify the above solution, you need to make the change to instead of
Also, make sure that you run this: https://next-auth.js.org/schemas/postgres |
In addition to the solution provided by @arnaudjnn, another solution is to set the brianc/node-postgres#2009 (comment) |
Thank you, @arnaudjnn and @brunocrosier! I was getting desperate with a site launch deadline looming, quite an obscure problem and fix! It worked for me. I would like to understand the problem better. Is it Heroku's Postgres SSL cert that is self signed and Node.js that typically rejects self signed certificates and so this configuration does what exactly – it seems that |
When I use a basic postgres url from Heroku free plan (without SSL) to the starter app I have the following error:
The app works well if I use sqlite.
I tried to add
ssl=true
but I have the following error:The text was updated successfully, but these errors were encountered: