confirmPasswordReset method
Future<void>
confirmPasswordReset(
- String token,
- String password, {
- required void onSuccess(),
- required void onError(
- SyneriseError error
This function confirms a password reset using a token and a new password.
Args: token (String): The token is a unique string that is generated when a user requests to reset their password. This token is used to verify the user's identity when they reset their password. password (String): The password parameter is a string that represents the new password that the user wants to set for their account after resetting their password.
Implementation
Future<void> confirmPasswordReset(String token, String password,
{required void Function() onSuccess,
required void Function(SyneriseError error) onError}) async {
SyneriseResult<void> result =
await _methods.confirmPasswordReset(token, password);
result.onSuccess((result) {
onSuccess();
}).onError((error) {
onError(error);
});
}