comparePassword

open fun comparePassword(user: User, password: String): Boolean

Safely compare a plaintext password against the user's stored password.

Return

true when the password matches

Parameters

user

the user whose password hash to compare

password

the plaintext password to verify