feat(auth): implement forgot-password and reset-password endpoints - #4
Open
Hadiqa13 wants to merge 12 commits into
Open
feat(auth): implement forgot-password and reset-password endpoints#4Hadiqa13 wants to merge 12 commits into
Hadiqa13 wants to merge 12 commits into
Conversation
Hadiqa13
force-pushed
the
feature/forgot-reset-password
branch
from
May 13, 2026 10:45
a23d99a to
c6d9da5
Compare
awoniran
self-requested a review
May 25, 2026 09:44
Author
|
@awoniran , could you please submit your review when you get a chance? Your comments are still pending. |
…rdToken, rename authToken, fix email validation
awoniran
suggested changes
Jun 1, 2026
awoniran
suggested changes
Jun 1, 2026
awoniran
left a comment
Contributor
There was a problem hiding this comment.
Hey Hadiqa, re-submitting review.
- Change database provider to PostgreSQL - Move reset password OTP fields to UserVerifications model - Update ResetPasswordDTO to use OTP instead of token - Remove min length validation from email field - Implement 6-digit OTP generation for forgot password - Update reset password to verify OTP from UserVerifications table - Fix deviceId missing in userVerifications.create
awoniran
reviewed
Jun 1, 2026
awoniran
reviewed
Jun 1, 2026
awoniran
reviewed
Jun 1, 2026
- Add admins and AdminTokens models to schema - Create admin auth service with ACID transaction - Implement single session enforcement (revoke old tokens) - Add admin login, verify, logout endpoints - Register admin routes in server.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Files Modified:
src/interfaces/auth.interface.ts- Renamed authToken to tokensrc/schemas/auth.schema.ts- Added validation schemassrc/controllers/auth.controller.ts- Added controller methodssrc/routes/auth.routes.ts- Added API routessrc/services/auth.service.ts- Implemented business logicprisma/schema.prisma- Added UserTokens model