Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update authController.js #243

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

asrithaMulugoju
Copy link

@asrithaMulugoju asrithaMulugoju commented Jun 3, 2024

🛠️ Fixes Issue #243

  • Imported 'bcrypt' library for password hashing.
  • Set OTP expiration time to 2 minutes from the current timestamp.
  • Implemented OTP expiration check and error message if expired.
  • Hashed the new password using bcrypt with a cost factor of 10 for enhanced security.

👩‍💻 Changes Proposed:

  • 7 line: 'bcrypt' is a Node.js library used to securely hash passwords, protecting sensitive user data by converting passwords into irreversible strings of characters.
  • 25 line: Sets the expiration time for the OTP by adding 2 minutes (120,000 milliseconds) to the current timestamp.
  • 69 to 73 lines: Checks if the OTP data is not found or if the OTP has expired by comparing its expiration time with the current timestamp, returning an error message if expired.
  • 163 to 164 lines: Hashes the new password using the bcrypt library with a specified cost factor of 10, enhancing security by converting the password into an irreversible string.

✔️ Check List:

  • My code follows the code style of this project.
  • This PR does not contain Plagiarised content.
  • The title of my pull request is a short description of the request changes.

📝 Note to reviewers


Copy link

vercel bot commented Jun 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
shopy-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2024 0:13am

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, @asrithaMulugoju! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project.

We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our contributing guidelines

@asrithaMulugoju
Copy link
Author

@mohitparmar1 could you please add label as gssoc and add level1 or level2 or level3 based on the feature.

@sanjay-kv
Copy link
Collaborator

@mohitparmar1 Let the contributor know why the PR pending and inform any further wait time if any?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants