mfaVerifyByPhone static method

Future<AuthResult> mfaVerifyByPhone(
  1. String phone,
  2. String code
)

MFA by phone number and SMS verify code

Implementation

static Future<AuthResult> mfaVerifyByPhone(String phone, String code) async {
  var body = jsonEncode({'phone': phone, 'code': code});
  final Result result =
      await post('/api/v2/applications/mfa/sms/verify', body);
  AuthResult authResult = AuthResult(result);
  authResult.user = await createUser(result);
  return authResult;
}