diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js index b3b6f2179..bc5343487 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js @@ -217,9 +217,10 @@ export default async function createDocumentWithTemplate(request, response) { }; const objectId = contactMail[i].contactPtr.objectId; - const hostUrl = baseUrl.origin; - let signPdf = `${hostUrl}/login/${res.id}/${contactMail[i].email}/${objectId}/${serverParams}`; + // let signPdf = `${hostUrl}/login/${res.id}/${contactMail[i].email}/${objectId}/${serverParams}`; + const encodeBase64 = btoa(`${res.id}/${contactMail[i].email}/${objectId}`); + let signPdf = `${hostUrl}/login/${encodeBase64}`; const openSignUrl = 'https://www.opensignlabs.com/contact-us'; const orgName = template.ExtUserPtr.Company ? template.ExtUserPtr.Company : ''; const themeBGcolor = '#47a3ad'; @@ -316,11 +317,12 @@ export default async function createDocumentWithTemplate(request, response) { properties: { response_code: 200 }, }); } + const encodeBase64 = btoa(`${res.id}/${x.email}/${x.contactPtr.objectId}`); return response.json({ objectId: res.id, signurl: contact.map(x => ({ email: x.email, - url: `${baseUrl.origin}/login/${res.id}/${x.email}/${x.contactPtr.objectId}/${serverParams}`, + url: `${baseUrl.origin}/login/${encodeBase64}`, })), message: 'Document sent successfully!', }); diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js index f6656f6fb..435bda342 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js @@ -278,7 +278,9 @@ export default async function createDocumentwithCoordinate(request, response) { const objectId = contactMail[i].contactPtr.objectId; const hostUrl = baseUrl.origin; - let signPdf = `${hostUrl}/login/${res.id}/${contactMail[i].email}/${objectId}/${serverParams}`; + const encodeBase64 = btoa(`${response.id}/${contactMail[i].email}/${objectId}`); + let signPdf = `${hostUrl}/login/${encodeBase64}`; + // let signPdf = `${hostUrl}/login/${res.id}/${contactMail[i].email}/${objectId}/${serverParams}`; const openSignUrl = 'https://www.opensignlabs.com/contact-us'; const orgName = parseExtUser.Company ? parseExtUser.Company : ''; const themeBGcolor = '#47a3ad'; @@ -359,11 +361,12 @@ export default async function createDocumentwithCoordinate(request, response) { properties: { response_code: 200 }, }); } + const encodeBase64 = btoa(`${res.id}/${x.email}/${x.contactPtr.objectId}`); return response.json({ objectId: res.id, signurl: contact.map(x => ({ email: x.email, - url: `${baseUrl.origin}/login/${res.id}/${x.email}/${x.contactPtr.objectId}/${serverParams}`, + url: `${baseUrl.origin}/login/${encodeBase64}`, })), message: 'Document sent successfully!', });