validatePasswordHash static method
Generates a password hash from the password using the provided hash algorithm and validates that they match.
If the password hash does not match the provided hash, the
onValidationFailure
function is called with the hash and the password
hash as arguments.
If an error occurs, the onError
function is called with the error as
argument.
Implementation
static Future<bool> validatePasswordHash(
String password,
String email,
String hash, {
void Function({
required String passwordHash,
required String storedHash,
})? onValidationFailure,
void Function(Object e)? onError,
}) =>
AuthConfig.current.passwordHashValidator(
password,
email,
hash,
onError: onError,
onValidationFailure: onValidationFailure,
);