-
Notifications
You must be signed in to change notification settings - Fork 299
auth app #213
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
base: master
Are you sure you want to change the base?
auth app #213
Conversation
mateacademy-ai-mentor
left a comment
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.
Review Summary
This is an excellent submission with a very well-structured application! I'm requesting a couple of changes to fix a critical issue and improve state management.
-
Critical Fix: In
frontend/src/services/authClient.js, thechangePasswordfunction is missing theAuthorizationheader in its API call. Although it accepts atoken, it's not being sent with the request, which would cause password changes to fail with a real backend. Please add the header, similar to how it's done in theupdateProfilefunction. -
State Management: In
frontend/src/pages/Profile.jsx, when a user changes their email, the UI doesn't update until the page is refreshed. This is because you're callingauthClientdirectly, bypassing theAuthContext. A better approach is to create achangeEmailfunction within yourAuthProviderto handle both the API call and the state update, ensuring the UI reflects the change immediately.
You've done a fantastic job on this project. Once these fixes are in, it will be perfect!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
mateacademy-ai-mentor
left a comment
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.
Review Summary
Excellent work on this project! I am approving your submission as you have successfully implemented all the required features and fixed the previous critical issues. The application is fully functional, and the backend is particularly well-structured.
As a suggestion for future improvement, consider centralizing all authentication-related logic. You could move the changeEmail and changePassword functions from the Profile.jsx component into your AuthContext.jsx. This would create a more consistent and maintainable architecture, similar to how you've handled the updateProfile function.
Overall, this is a fantastic submission. Keep up the great work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
auth app (ui + backend)