Skip to content

Tag: express

Res.send not a function

I have an endpoint (using express) which requires me to do some fetching first. Once a parse the response and use res.send I get an error res.send is not a function. I tried searching for this error but all searches show users had res,req in the wrong order. In this case, mine appear to be right. Why is it re…

Why hashing the reset password token?

I have this forgot password handler in my Express app. I send an email with a crypto.randomBytes(20).toString(“hex”) token, that I use later to verify the request. It is working perfectly. However, I have seen that people are hashing this token before sending it and storing in the data base, and I…