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
127 stars 32 forks source link

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

Open arbazadam opened 2 years ago

arbazadam commented 2 years ago

I get this exception when i try to connect to postgres server with a dart server app. Interestingly a simple console based app works without any exception, upon doing some research the maintainer of this repo has said that ""Postgres 13 gets scram-sha-256 as the default password_encryption value, and the current Dart library supports only md5"" Reference to the above: https://githubhot.com/repo/stablekernel/postgresql-dart/issues/145

I am curious to know that why only it fails for an app created using the shelf template whereas the other console app just works fine. I thought that this might be happening due to environment variable issues but i even tried hardcoding my db configurations still no luck. Here is the screenshot of what my code looks like and the exception. postgre-dart-error