sendVerifyTwoFactor method

  1. @override
Future<AuthActionResult> sendVerifyTwoFactor({
  1. required String token,
  2. required String channel,
})
override

channel es el canal por el que se envía el código: email o sms.

Implementation

@override
Future<AuthActionResult> sendVerifyTwoFactor({
  required String token,
  required String channel,
}) async {
  final response = await dio.post(
    '/microsite/participants/send_verify_two_factor',
    options: Options(headers: {'Authorization': 'Bearer $token'}),
    data: {
      "api_key": Environment.apiKey,
      "campaign": Environment.campaign,
      "channel": channel,
    },
  );
  return _jsonToAuthActionResult(_parseResponse(response.data));
}