Integration: forgot password wiring - #54
Open
Prajeeth-12 wants to merge 3 commits into
Open
Conversation
Munazzah-Rakhangi
requested changes
Oct 25, 2025
Munazzah-Rakhangi
left a comment
Collaborator
There was a problem hiding this comment.
Tested locally — backend POST /api/v1/auth/forgot-password works correctly (returns 200 via curl), but the frontend call still fails with 404.
Please:
- Verify the endpoint path (/api/v1/auth/forgot-password) matches the backend.
- Check VITE_API_URL in .env and ensure the request URL is built properly.
- Confirm payload { "phoneOrEmail": "..." } and method POST.
- Display a clear success message on 200 and a user-friendly error on failure.
- Connect the email flow so the actual password reset link is sent to the user’s inbox.
- Re-test after fixing and then re-request review.
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.
This pull request adds backend integration and improves user feedback for the forgot password page. The main changes include creating a reusable API helper, connecting the forgot password form to the backend, and enhancing the UI to handle loading and error states.
API integration and error handling:
apiPosthelper infrontend/src/lib/api.jsfor making POST requests and handling errors and JSON parsing.apiPost('/api/v1/auth/forgot-password', { phoneOrEmail })on submit, and handling API errors with user-friendly messages.UI/UX improvements: