-
Notifications
You must be signed in to change notification settings - Fork 306
Expand file tree
/
Copy pathreset-password.js
More file actions
49 lines (37 loc) · 1.08 KB
/
reset-password.js
File metadata and controls
49 lines (37 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
'use strict'
/**
* Returns a partial Email object (minus the `to` and `from` properties),
* suitable for sending with Nodemailer.
*
* Used to send a Reset Password email, upon user request
*
* @param data {Object}
*
* @param data.resetUrl {string}
* @param data.webId {string}
*
* @return {Object}
*/
function render (data) {
return {
subject: 'Account password reset',
/**
* Text version
*/
text: `Hi,
We received a request to reset your password for your Solid account, ${data.webId}
To reset your password, click on the following link:
${data.resetUrl}
If you did not mean to reset your password, ignore this email, your password will not change.`,
/**
* HTML version
*/
html: `<p>Hi,</p>
<p>We received a request to reset your password for your Solid account, ${data.webId}</p>
<p>To reset your password, click on the following link:</p>
<p><a href="${data.resetUrl}">${data.resetUrl}</a></p>
<p>If you did not mean to reset your password, ignore this email, your password will not change.</p>
`
}
}
module.exports.render = render