setupTwoFactorTotp method
Arranca la configuración de 2FA por TOTP (Google Authenticator y similares): devuelve el secreto y el QR para escanear.
Implementation
@override
Future<SetupTwoFactorTotp> setupTwoFactorTotp({required String token}) async {
final response = await dio.post(
'/microsite/participants/verify_two_factor_totp/setup',
options: Options(headers: {'Authorization': 'Bearer $token'}),
data: {
"api_key": Environment.apiKey,
"campaign": Environment.campaign,
},
);
final responseData = _parseResponse(response.data);
return AuthMapper.setupTwoFactorTotpToEntity(
SetupTwoFactorTotpResponse.fromJson(responseData),
);
}