Closed nishant0708 closed 3 months ago
@nishant0708 is attempting to deploy a commit to the Abhijeet's projects Team on Vercel.
A member of the Team first needs to authorize it.
Hey @abhijeetnishal you can check it now i have implemented it new Ui
hey @abhijeetnishal You can check it now just few things . I have updated the generate token code for accepting expiry time of token as i anted that reset password link should expire after some time
And there was No need to make forgot password and reset password as authenticated routes as that i have handled in controller .No user without token can edit or reset password
hey @abhijeetnishal You can check it now just few things . I have updated the generate token code for accepting expiry time of token as i anted that reset password link should expire after some time
I have seen expiry thing, i guess it's there when I reviewed the code.
And there was No need to make forgot password and reset password as authenticated routes as that i have handled in controller .No user without token can edit or reset password
Hey @nishant0708, the reason of doing this is not because it will work or handled in the controllers, it is because we need to follow the same API design or principles the project is following and also checking the token that is already being checked in auth middleware is just adding extra code and not using the existing code. For passwords route also we can do that check in controller it will work but it not follow DRY coding principles means repeating the same code.
I hope you understood the reason, do the necessary changes as mentioned.
Hey @abhijeetnishal i will do it just give me some time i will have to Go through the logic again but i will figure it out no worries
hey @abhijeetnishal please check my latest commit . I have tried everything but i am facing this error I have added token and everything Can you help me with this
Hey @nishant0708, could you share the payload for the same, as you are showing response. Also we need to send token for reset route only not for forget as token can't be generated on client side.
@abhijeetnishal This is of reset - password i have removed authentication from forgot-password
Hey @nishant0708, of you see the payload, the token is missing this means somehow it's not sending from client that's why the server is not receiving and showing error. Whatever in payload will be send to server. Refer password routes how we are sending from client.
Hey @abhijeetnishal I have checked password route in payload we are sending token the same way in reset route as password route
Ok @nishant0708, i will check this issue and let you know, give me some time currently I am at work.
Hey @nishant0708, i just checked with some random token appended with the URL it's working for me. Please check the correctly whenever you are resetting the password check in route that token exists.
@abhijeetnishal It was working before as well but when I use is authenticated middleware in my route it is not working even with correct token but as soon as I remove that middleware it will work fine. remember video i attached
No issues @nishant0708, I will fix it. I will review the code once done the necessary changes and this isAuthenticated I will fix.
Hey @nishant0708, i have approved this PR.
Star this repo and share with your network. Thanks for contributing.
feat:Implement reset password #45
ADDED FORGOT PASSWORD FEATURE IN NEW UI
https://github.com/abhijeetnishal/Password-Shield/assets/101548649/2f1b2bdc-f6b0-480d-b9e4-86b80505a5ca