Password Hasher

Express With Users implements GitHub - node-argon2 for password hashing and verifying.
Results are computed for the password: P@ssw0rd. A page refresh will generate new hashes.
import argon2 from 'argon2';
...
const password = 'P@ssw0rd';
const hashedPassword1 = await argon2.hash(password);
const verified1 = await argon2.verify(hashedPassword1, password);
const hashedPassword2 = await argon2.hash(password);
const verified2 = await argon2.verify(hashedPassword2, password);
const invalidPassword = 'InvalidPassword';
const invalidResult = await argon2.verify(hashedPassword2, invalidPassword);
hashedPassword1:
$argon2id$v=19$m=65536,t=3,p=4$seAtOD3yndPMKUVgDotPYg$AL7pNZPfkHvIQFPsCFrjKT4yjboMEjetdDk3MDxBriI
verified1: true

Same password, different hash.

hashedPassword2:
$argon2id$v=19$m=65536,t=3,p=4$eLx4ac1rKKUfFImrV3rGfQ$o4a6S7PYkqQgoFDxUovbbONPRJJ74BQ25e2PyWzk6SE
verified2: true

Invalid password fails verification.

invalidResult: false
See this article for more information.
Password Hasher Utility