diff --git a/EnvelopeGenerator.Application/Services/EnvelopeMailService.cs b/EnvelopeGenerator.Application/Services/EnvelopeMailService.cs index 0763fb59..99a77ca0 100644 --- a/EnvelopeGenerator.Application/Services/EnvelopeMailService.cs +++ b/EnvelopeGenerator.Application/Services/EnvelopeMailService.cs @@ -164,11 +164,14 @@ namespace EnvelopeGenerator.Application.Services throw new ArgumentNullException(nameof(dto), $"TFA Qr Code cannot sent. Receiver information is missing. Envelope receiver dto is {JsonConvert.SerializeObject(dto)}"); if (dto.Receiver.TotpSecretkey is null) throw new ArgumentNullException(nameof(dto), $"TFA Qr Code cannot sent. Receiver.TotpSecretKey is null. Envelope receiver dto is {JsonConvert.SerializeObject(dto)}"); + if (dto.Receiver.TotpExpiration is null) + throw new ArgumentNullException(nameof(dto), $"TFA Qr Code cannot sent. Receiver.TotpExpiration is null. Envelope receiver dto is {JsonConvert.SerializeObject(dto)}"); var totp_qr_64 = _codeGenerator.GenerateTotpQrCode(userEmail: dto.Receiver.EmailAddress, secretKey: dto.Receiver.TotpSecretkey).ToBase64String(); return SendAsync(dto, EmailTemplateType.TotpSecret, new() { - {"[TFA_QR_CODE]", totp_qr_64 } + {"[TFA_QR_CODE]", totp_qr_64 }, + {"[TFA_EXPIRATION]", dto.Receiver.TotpExpiration } }); } }