updateUserPassword method

Future<void> updateUserPassword({
  1. required ConfirmationCode code,
  2. required UserPassword newPassword,
  3. UserLogin? login,
  4. UserNum? num,
  5. UserEmail? email,
  6. UserPhone? phone,
})

Resets password for a MyUser identified by the provided num/login/email/phone (exactly one of fourth should be specified) and recovery ConfirmationCode.

If MyUser has no password yet, then newPassword will be his first password unlocking the sign-in capability.

Implementation

Future<void> updateUserPassword({
  required ConfirmationCode code,
  required UserPassword newPassword,
  UserLogin? login,
  UserNum? num,
  UserEmail? email,
  UserPhone? phone,
}) async {
  Log.debug(
    'updateUserPassword(code: $code, newPassword: ${newPassword.obscured}, login: $login, num: $num, email: ${email?.obscured}, ${phone?.obscured})',
    '$runtimeType',
  );

  await _authRepository.updateUserPassword(
    login: login,
    num: num,
    email: email,
    phone: phone,
    code: code,
    newPassword: newPassword,
  );
}