generated from uofa-cmput404/project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change Lists: - Implemented endpoints to server login and signup purpose - Updated `Author` model by adding `user` field for authentication - Added `Login` and `SignUp` components on frontend side - Added `react-toastify` library for displaying toast message Todo: - Implement the logic to restrict certains routes when not logged in Guide on testing: - Please run `migrate` and `make migrations` on server before you run the server since there are changes to the database. - For testing only the 2 new endpoints (using Postman) >- signup: Currently returns status code 200 on succesful sign up, 409 on existing username and 400 on others. ![Screenshot 2023-10-23 at 12 09 36 AM](https://github.com/uofa-cmput404/404f23project-404-team-not-found/assets/54903938/ac442736-c522-41c2-9890-3f5deaa71529) >- login: Currently returns status code 201 on succesful login, 401 on wrong password and 404 on not existing username. ![Screenshot 2023-10-23 at 12 12 23 AM](https://github.com/uofa-cmput404/404f23project-404-team-not-found/assets/54903938/f3303f4c-0d81-4491-be68-7945ec609d0c) - For testing on the frontend side >- at `/signup/`, there are currently 5 fields. Any errors will have a toast message pop up. Succesful display a success message and redirect to `/login/` >- at `/login/`, there are currently 2 fields. Any errors will have a toast message pop up. Succesful display a success message and redirect to `/home-page/` and save `authToken` to localStorage (localStorage can be found in develop tools).
- Loading branch information
Showing
13 changed files
with
339 additions
and
26 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.