verificationWithAtsign method

Future verificationWithAtsign(
  1. String atsign,
  2. String verificationCode
)

validating atsign with verification code

Implementation

Future<dynamic> verificationWithAtsign(
    String atsign, String verificationCode) async {
  // if init was not called earlier, call here to initialize the http
  if (!initialized) {
    _init();
  }
  String path = AtOnboardingConstants.apiPath +
      AtOnboardingConstants.validationWithAtsign;
  Map<String, String?> data = <String, String?>{
    'atsign': atsign,
    'otp': verificationCode
  };

  dynamic response = await postRequest(path, data);

  return response;
}