Hashes and checks passwords, for sign-up, sign-in, password changes and the admin that db/startup.ts seeds. It reads no config, so the startup tasks can use it before the server's settings are checked.

Functions

f
hashPassword(password: string): Promise<string>

Hashes password with scrypt and a random salt, as hash.salt in hex, for users.password_hash.