gabrielius7369
08/10/2022, 4:17 PMlet { user, emailVerifyLink } = input;
and let { id, email } = user;
, but how do I get the password reset link in the case when I'm sending a password reset email and input.type !== "EMAIL_VERIFICATION"
? I'm looking at the page https://supertokens.com/docs/emailpassword/email-delivery/custom-method for reference!rp_st
08/10/2022, 4:21 PMrp_st
08/10/2022, 4:23 PMts
EmailPassword.init({
emailDelivery: {
override: (originalImplementation) => {
return {
...originalImplementation,
sendEmail: async function (input) {
if (input.type === "EMAIL_VERIFICATION") {
let { user, emailVerifyLink } = input;
let { id, email } = user;
// TODO: create and send email verification email
} else {
let { passwordResetLink, user } = input;
let { id, email } = user;
// TODO: create and send password reset email
// Or use the original implementation which calls the default service,
// or a service that you may have specified in the emailDelivery object.
return originalImplementation.sendEmail(input);
}
}
}
}
},
})
gabrielius7369
08/11/2022, 8:20 AMpasswordResetLink
!rp_st
08/11/2022, 9:47 AM