Page MenuHomeSealhub

password-reset.js
No OneTemporary

password-reset.js

const SimpleTemplate = require("./simple");
module.exports = async function PasswordReset(app, { email_address, token }) {
const {
items: [{ username }],
} = await app.run_action(
new app.Sealious.SuperContext(),
["collections", "users"],
"show",
{ filter: { email: email_address } }
);
return SimpleTemplate(app, {
subject: app.i18n("password_reset_email_subject", app.manifest.name),
to: `${username}<${email_address}>`,
text: `
${app.i18n("password_reset_email_text", [
app.manifest.name,
username,
])}`,
buttons: [
{
text: app.i18n("password_reset_cta"),
href: `${
app.manifest.base_url
}/confirm-password-reset?token=${token}&email=${email_address}`,
},
],
});
};

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 14:02 (10 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
557246
Default Alt Text
password-reset.js (739 B)

Event Timeline