Fix Issue 423: Otp Functionality enhancement with SQL Events #432
+91
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📋 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
Added an OTP generator module for automatic OTP generation.
Implemented OTP expiration functionality to restrict OTP validity to a specific time period.
Integrated a timer in the UI to display the remaining time before OTP expiration.
Resolved the /resetpassword endpoint issue by renaming it to /reset to follow proper naming conventions.
Fixed database issues related to OTP generation and expiration, ensuring smooth functionality under extreme conditions.
Prevented repeated OTP sending by introducing rate-limiting logic.
✅ Checklist
Before submitting the PR, please make sure you have completed the following:
I have followed all the guidelines mentioned in CONTRIBUTING.md.
My code follows the style guidelines of this project.
I have performed a self-review of my own code.
I have commented my code, particularly in hard-to-understand areas.
I have made corresponding changes to the documentation (if applicable).
I have tested it locally and it works fine.
Any dependent changes have been merged and published in downstream modules.
🏷️ Types of Changes
What type of changes does your code introduce? (Check all that apply)
Bug fix (non-breaking change which fixes an issue) 🐛
[] New feature (non-breaking change which adds functionality) ✨
UI enhancement (non-breaking change which enhances UI) 🎨
Documentation update 📚
Fixes #423