Resolves #34
In this PR, I have done the following changes:
Add the feature for User to reset his Password, in case the user forgets the Password.
The user will get a mail, which will contain a link to the reset password page, where he/she can reset his password.
Also, the token, will expire after an hour, so the user, will have to request for the token again, after an hour, in case he didn't update the password in the allotted 1 hour.
Once he changes his password, his password will be updated, and he will be logged in as well.
Also, on the reset password page, there is a Password confirm field, to make sure, that the User types the correct password.
To achieve the mailing feature, I have incorporated sendGrid, and for the token, I have used the built-in Crypto Module.
Also, out of the 4 controller functions, 3 of them are Async Functions, so I have added an Async Error Handler middleware, to catch the errors in those functions, and for future async controller functions as well.
Hey @sarthakm21, can you please review this PR, and tell me, if any further changes are required!
Resolves #34 In this PR, I have done the following changes:
Hey @sarthakm21, can you please review this PR, and tell me, if any further changes are required!