resetPasswordBySmsCode static method

Future resetPasswordBySmsCode(
  1. String mobile,
  2. String code,
  3. String newPassword
)

Resets a user's password via mobile phone.

Implementation

static Future resetPasswordBySmsCode(
    String mobile, String code, String newPassword) async {
  if (isNullOrEmpty(mobile)) {
    throw ArgumentError.notNull('mobile');
  }
  if (isNullOrEmpty(code)) {
    throw ArgumentError.notNull('code');
  }
  if (isNullOrEmpty(newPassword)) {
    throw ArgumentError.notNull('newPassword');
  }
  await LeanCloud._httpClient.put('resetPasswordBySmsCode/$code',
      data: {'mobilePhoneNumber': mobile, 'password': newPassword});
}