Trying to connect with a scram-sha-256 password fails (error: password authentication failed for user "<user>"), while md5 works.
Environmnent:
- Debian 11
- Node 17
- pg 8.7.1
- PostgreSQL 13 or 14 (tested with both, fails with both)
Steps to reproduce:
- configure pg_hba to use scram-sha-256 authentication method
- reload/restart postgresql cluster
- with
psql:
create user someuser password 'secret';
create database somedb owner someuser;
- try to connect to the database using psql:
psql postgres://someuser:secret@localhost:5432/somedb
- try to connect to the database using node-postgres
- fails, with
error: password authentication failed for user "someuser"
- optionally, drop the db and user, then redo the same steps but with postgresql configured to use md5 instead, and verify that connecting works both for psql and node-postgres
Trying to connect with a
scram-sha-256password fails (error: password authentication failed for user "<user>"), whilemd5works.Environmnent:
Steps to reproduce:
psql:create user someuser password 'secret';create database somedb owner someuser;psql postgres://someuser:secret@localhost:5432/somedberror: password authentication failed for user "someuser"