i want to send email after user password resetted to inform user his password is resetted
k
i want to send email after user password resetted to inform user his password is resetted
r
hey @kabin7858 which backend SDk are you using?
k
using fastify in backend
nodejs
r
and which recipe are you using of supertokens?
emailpassword or thirdpartyemailpassword?
k
emailpassword
r
Try something like this on the backend EmailPassword.init
Copy code
ts
EmailPassword.init({
    override: {
        apis: (oI) => {
            return {
                ...oI,
                passwordResetPOST: async function (input) {
                    let resp = await oI.passwordResetPOST!(input);
                    if (resp.status === "OK") {
                        let userId = resp.userId!;
                        let userInfo = await EmailPassword.getUserById(userId);
                        let email = userInfo?.email;
                        // send email...
                    }
                    return resp;
                }
            }
        }
    }
})
k
i want to know if there's a supertoken's way to send mail sfter password reset response status in ok
r
there isn't. We don't send post password reset emails. So you will have to do that on your own
k
ok thanks for hellp