resetPassword static method

Future<void> resetPassword({
  1. required String userId,
  2. required String code,
  3. required String newPassword,
})

Implementation

static Future<void> resetPassword({
  required String userId,
  required String code,
  required String newPassword,
}) async {
  User user = User()..id = userId;
  HeraRequest req = HeraRequest()
    ..namespace = _namespace
    ..verificationCode = (VerificationCode(code: Hash(body: code)))
    ..update = (User()..password = Hash(body: newPassword));
  req.user = user;
  await _heraClient.resetPassword(req);
}