Skip to content

Commit 40ab50a

Browse files
author
Lasim
committed
feat: implement password change notification email and update user account routing
1 parent ab3d02c commit 40ab50a

File tree

10 files changed

+939
-27
lines changed

10 files changed

+939
-27
lines changed

package-lock.json

Lines changed: 290 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/backend/src/email/emailService.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,33 @@ export class EmailService {
300300
},
301301
});
302302
}
303+
304+
/**
305+
* Send a password changed notification email (type-safe helper)
306+
*/
307+
static async sendPasswordChangedEmail(options: {
308+
to: string;
309+
userName?: string;
310+
userEmail: string;
311+
changeTime: string;
312+
ipAddress?: string;
313+
userAgent?: string;
314+
loginUrl?: string;
315+
supportEmail?: string;
316+
}): Promise<EmailSendResult> {
317+
return this.sendEmail({
318+
to: options.to,
319+
subject: 'Password Changed - DeployStack Security Alert',
320+
template: 'password-changed',
321+
variables: {
322+
userName: options.userName,
323+
userEmail: options.userEmail,
324+
changeTime: options.changeTime,
325+
ipAddress: options.ipAddress,
326+
userAgent: options.userAgent,
327+
loginUrl: options.loginUrl || 'https://app.deploystack.com/login',
328+
supportEmail: options.supportEmail || '[email protected]',
329+
},
330+
});
331+
}
303332
}

0 commit comments

Comments
 (0)