@pathmaker-digital/pmd-utilities - v2.2.6
    Preparing search index...

    Function comparePassword

    • Compares a plain password with a hashed password.

      Parameters

      • password: string

        The plain password.

      • hashedPassword: string

        The hashed password to compare against.

      Returns Promise<boolean>

      True if the passwords match, false otherwise.

      const hashed = await hashPassword("myPassword123!");
      const isMatch = await comparePassword("myPassword123!", hashed);
      console.log(isMatch); // true