Skip to content

Commit

Permalink
Merge pull request #942 from credebl/fix/encrypt-clientId-clientSecret
Browse files Browse the repository at this point in the history
fix: solved the clientId dcryption in verification email
  • Loading branch information
KulkarniShashank authored Aug 26, 2024
2 parents f45ad30 + 57da02f commit 025656a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/user/src/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,15 @@ export class UserService {
try {
const platformConfigData = await this.prisma.platform_config.findMany();

const decryptClientId = await this.commonService.decryptPassword(clientId);
const urlEmailTemplate = new URLUserEmailTemplate();
const emailData = new EmailDto();
emailData.emailFrom = platformConfigData[0].emailFrom;
emailData.emailTo = email;
const platform = platformName || process.env.PLATFORM_NAME;
emailData.emailSubject = `[${platform}] Verify your email to activate your account`;

emailData.emailHtml = await urlEmailTemplate.getUserURLTemplate(email, verificationCode, redirectUrl, clientId, brandLogoUrl, platformName);
emailData.emailHtml = await urlEmailTemplate.getUserURLTemplate(email, verificationCode, redirectUrl, decryptClientId, brandLogoUrl, platformName);
const isEmailSent = await sendEmail(emailData);
if (isEmailSent) {
return isEmailSent;
Expand Down

0 comments on commit 025656a

Please sign in to comment.