govind-kumarr / simple_rag_dashboard

Chat with your docs. The deployed link is not updated. Please setup project locally to find issues.
19 stars 32 forks source link

create forget password backend #95

Open piyush-gangrade opened 3 weeks ago

piyush-gangrade commented 3 weeks ago

Issue #50 and #79: Duplicate Issues

Updation:

  1. Modify User Schema: File: ./node_server/models/User.model.js Action: Add two new fields forget_password_token and forget_password_expiry to the User schema.

  2. Update Authentication Controller: File: ./node_server/controller/auth.controllers.js Actions: Add three new functions: forgetPassword: Sends a reset password link to the provided email address. resetPasswordVerify: Checks if the reset password link is valid. resetPassword: Verifies the request with the reset password link and allows the user to change the password if the link is valid.

  3. Extend Authentication Routes: File: ./node_server/routes/auth.routes.js Actions: Add three new routes for the respective functions: POST /auth/forget-password for the forgetPassword function. POST /auth/reset-password-verification for the resetPasswordVerify function. POST /auth/reset-password for the resetPassword function.

Addition:

  1. Email Template: File: ./node_server/utils/sendEmail/Templates/forgetPasswordTemplate.js Action: Create a template for the "forget password" email.

https://github.com/govind-kumarr/simple_rag_dashboard/assets/133166222/68be3018-d51a-4ccf-8cee-8fdcfab186fe