I am using Postman and response I get is ```{ ...
# support-questions
s
I am using Postman and response I get is
Copy code
{
  "status": "OK"
}
No effect on changing the console location
r
Hey! Let’s talk here
Can you open an issue about this on our GitHub please?
s
Okay
I will check around more before I do that.
r
Ok! Thanks
Hey @scherbatsky.jr were you able to figure out this issue?
s
I am using NEST js. I need to send an custom email to user when they request password reset by submitting their email. I am following this documentation: [Custom Password Reset Email ](https://supertokens.com/docs/emailpassword/common-customizations/reset-password/password-reset-email) I have added a console log to see if the function is reached or not. I am using postman and the route I am using is:
POST: http://<api_url>/auth/user/password/reset/token
Headers: rid => emailpassword Body:
Copy code
{
  "formFields": [
    {
      "id": "email",
      "value": "user@test.com"
    }
  ]
}
Code in supertokens.service:
Copy code
recipeList: [
        EmailPassword.init({
            resetPasswordUsingTokenFeature: {
                createAndSendCustomEmail: async (user, passwordResetURLWithToken) => {
                    console.log('I am here')
                    userService.sendEmail();
                }
            }
        }),
        Session.init()
    ]
The response I get is { status: "OK" }. But neither the console is logged nor the user service is called.
r
So that can also happen if the user you are sending the email to deosn't actually exist in the systyem
so if you have created a user that has the email user@test.com, then it will call the callback. Else not
And I can confirm that the callback will get called if a user exists cause we have tests for this, and I just edited one of our demo apps to have a callback which is getting called
s
Alright. That makes sense. All of our emails are prefixed to represent their tenant.
r
Okay. Does my comment help you solve your issue?
s
Yes. It does. Thanks
3 Views