gabrielius7369
08/10/2022, 4:17 PMlet { user, emailVerifyLink } = input;let { id, email } = user;input.type !== "EMAIL_VERIFICATION"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 AMpasswordResetLinkrp_st
08/11/2022, 9:47 AM