Skip to content

🔥 The free & Open Source DocuSign alternative

fix: otp auth must be disable in certificate if OTP verfication is off

prafull-opensignlabsc65f17a2162f
diff --git a/apps/OpenSignServer/cloud/parsefunction/pdf/GenerateCertificate.js b/apps/OpenSignServer/cloud/parsefunction/pdf/GenerateCertificate.js
index d9f33c1a7..0f0e98f30 100644
--- a/apps/OpenSignServer/cloud/parsefunction/pdf/GenerateCertificate.js
+++ b/apps/OpenSignServer/cloud/parsefunction/pdf/GenerateCertificate.js
@@ -458,17 +458,17 @@ export default async function GenerateCertificate(docDetails) {
});
currentPage.drawText('Viewed on :', {
- x: half,
+ x: half + 55,
y: yPosition2,
- size: text,
+ size: timeText,
font: timesRomanFont,
color: textKeyColor,
});
currentPage.drawText(`${new Date(x.ViewedOn).toUTCString()}`, {
- x: half + 75,
+ x: half + 112,
y: yPosition2,
- size: text,
+ size: timeText,
font: timesRomanFont,
color: textValueColor,
});
@@ -490,17 +490,17 @@ export default async function GenerateCertificate(docDetails) {
});
currentPage.drawText('Signed on :', {
- x: half,
- y: yPosition3,
- size: text,
+ x: half + 55,
+ y: yPosition3 + 5,
+ size: timeText,
font: timesRomanFont,
color: textKeyColor,
});
currentPage.drawText(`${new Date(x.SignedOn).toUTCString()}`, {
- x: half + 70,
- y: yPosition3,
- size: text,
+ x: half + 108,
+ y: yPosition3 + 5,
+ size: timeText,
font: timesRomanFont,
color: textValueColor,
});
@@ -520,22 +520,23 @@ export default async function GenerateCertificate(docDetails) {
font: timesRomanFont,
color: textValueColor,
});
- currentPage.drawText('Security level :', {
- x: half,
- y: yPosition4,
- size: text,
- font: timesRomanFont,
- color: textKeyColor,
- });
-
- currentPage.drawText(`Email, OTP Auth`, {
- x: half + 90,
- y: yPosition4,
- size: text,
- font: timesRomanFont,
- color: textValueColor,
- });
+ if (IsEnableOTP) {
+ currentPage.drawText('Security level :', {
+ x: half + 55,
+ y: yPosition4 + 10,
+ size: timeText,
+ font: timesRomanFont,
+ color: textKeyColor,
+ });
+ currentPage.drawText(`Email, OTP Auth`, {
+ x: half + 125,
+ y: yPosition4 + 10,
+ size: timeText,
+ font: timesRomanFont,
+ color: textValueColor,
+ });
+ }
currentPage.drawText('Signature :', {
x: 30,
y: yPosition5,