-
Notifications
You must be signed in to change notification settings - Fork 97
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
Fix Issue #423: Enhance otp function #431
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't save the expiry time of the otp in database instead use MySQL Events to delete the otp data for that user, it will be efficient
You can update the logic you have written in login.js and otp.js, also you have modified the reset endpoint but didn't modified it in dbServer.js.
Also you can do one thing in frontend: fix the send validation code
btn just below to the email input
Yeah sure |
I don't understand the purpose of frontend development or what I'm supposed to do. |
Actually I am telling that the send verification code btn should be below to the email input field and verification code input field should be below to the send verification button. |
ohk will do that |
Should I create a SQL event for OTP expiration and add the otp_created column as well? or you have any other idea in mind regarding this? |
or Should I use Otp_expiration as a variable? |
You can store the otp in the database but does not store the otp expiration time it can be done with MySQL events |
there is a issue in the last commit but i cant revert back to this i dont know why and even i cant make up the changes there is lot of issue in previous commit |
@prajwal2431 Ok no problem |
yess i have |
can i do like create a new branch and then make pr again and you can delete or discard this pr |
Sure, close it if you want |
what the problem is i have the same branch but these changes are not refeting on this pr i dont know why |
📋 Description
Fix Issue #423
This PR introduces several key improvements, including the addition of an OTP generator module with automatic OTP generation, the implementation of OTP expiration functionality, and the integration of a timer in the UI to show remaining OTP validity. Additionally, the PR resolves an issue with the
/resetpassword
endpoint, renaming it to/reset
. It also addresses a bug where repeated OTPs were sent in quick succession by implementing rate-limiting logic.🔨 Changes Made
/resetpassword
endpoint issue by renaming it to/reset
to follow proper naming conventions.✅ Checklist
Before submitting the PR, please make sure you have completed the following:
🏷️ Types of Changes
What type of changes does your code introduce? (Check all that apply)
Fixes #423
📸 Screenshots (if applicable)
Thank you for contributing to Research Nexus! We look forward to reviewing your PR and getting it merged!