You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a standalone lib that handles encoding PostgreSQL passwords client-side so that CREATE USER ... / ALTER USER ... statements do not include the plaintext of passwords in your application logs. It includes TypeScript type declarations as well.
So it replaces SQL like this being sent to your DB:
It defaults to using SCRAM-SHA-256 for the encoding but also supports md5 for older versions of PG. It also includes a helper to change a user's password using whatever the database says is the preferred encoding (i.e. SCRAM-SHA-256 for anything 10+ and md5 for anything older):
// client is a pg.ClientawaitalterUserPassword(client,{username: 'app',password: 'my-new-secret-password',});
The text was updated successfully, but these errors were encountered:
Please add
pg-password-util
to the wiki: https://www.npmjs.com/package/pg-password-utilIt's a standalone lib that handles encoding PostgreSQL passwords client-side so that
CREATE USER ...
/ALTER USER ...
statements do not include the plaintext of passwords in your application logs. It includes TypeScript type declarations as well.So it replaces SQL like this being sent to your DB:
With SQL like this:
It defaults to using SCRAM-SHA-256 for the encoding but also supports md5 for older versions of PG. It also includes a helper to change a user's password using whatever the database says is the preferred encoding (i.e. SCRAM-SHA-256 for anything 10+ and md5 for anything older):
The text was updated successfully, but these errors were encountered: