stablekernel / postgresql-dart

Dart PostgreSQL driver: supports extended query format, binary protocol and statement reuse.
https://www.dartdocs.org/documentation/postgres/latest
BSD 3-Clause "New" or "Revised" License
129 stars 32 forks source link

PostgreSQLSeverity.error : Unsupported authentication type 10, closing connection #145

Closed rdnobrega closed 3 years ago

rdnobrega commented 3 years ago

Hi, I'm using postgresql v13.0 x64. The library is giving me the following error: PostgreSQLException (PostgreSQLSeverity.error : Unsupported authentication type 10, closing connection. )

Now, yesterday was working just fine, nothing was effectively changed... The code to connect is the simplest (I'm still drafting my app): var connection = PostgreSQLConnection('localhost', 5432, 'rnobrega', username: 'rnobrega', password: '...');

Now that is not working, I modified the files pg_hba.conf and postgresql.conf (password encryption to md5, listen_adressses = '*') to replace scram-sha-256 to md5 and still not working...

pg_hba.conf:


local   all             all                                     md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     md5
host    replication     all             127.0.0.1/32            md5
host    replication     all             ::1/128                 md5
host    all             all             locahost                md5

any clues to what might be happening?

isoos commented 3 years ago

For reference: Postgres 13 gets scram-sha-256 as the default password_encryption value, and the current Dart library supports only md5. (SO thread)

If anybody wants to write support for the new hash, lib/src/connection_fsm.dart has the relevant authentication code, I'm happy to review PRs... :)

mars000 commented 3 years ago

wondering has scram-sha-256 support now been added ?