Compares a plain password with a hashed password.
The plain password.
The hashed password to compare against.
True if the passwords match, false otherwise.
const hashed = await hashPassword("myPassword123!");const isMatch = await comparePassword("myPassword123!", hashed);console.log(isMatch); // true Copy
const hashed = await hashPassword("myPassword123!");const isMatch = await comparePassword("myPassword123!", hashed);console.log(isMatch); // true
Compares a plain password with a hashed password.