Skip to content
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

feat: Implement protected routes #9

Merged
merged 1 commit into from
Apr 19, 2024
Merged

Conversation

tristenwallace
Copy link
Owner

This pull request introduces protected route functionalities to ensure that users are authenticated before accessing certain pages within the application. By directing users to log in before viewing pages like /create or handling non-existent routes (404), we enhance user experience and security.

Changes

  • ProtectedRoute Component: Added a new component that checks for user authentication and redirects to the login page if the user is not authenticated.
  • Login Component Enhancements: Updated the login process to redirect users back to their initially requested page after successful authentication.
  • Navigation Adjustments: Integrated the ProtectedRoute component within the routing setup to guard specific routes.
  • Error Handling: Improved error handling in the login workflow to manage failed login attempts more gracefully.
  • Testing: Updated existing tests and added new tests to ensure that the ProtectedRoute component works as expected.

@tristenwallace tristenwallace merged commit daba7c1 into main Apr 19, 2024
@tristenwallace tristenwallace deleted the feat/protected-routes branch April 19, 2024 18:24
tristenwallace pushed a commit that referenced this pull request Jul 15, 2024
# 1.0.0 (2024-07-15)

### Bug Fixes

* Immediate Update Issues for Leaderboard and PollList ([#37](#37)) ([1e76f57](1e76f57))
* Leaderboard PollSlice Import ([#10](#10)) ([8fc57da](8fc57da))
* Model associations and importing ([d9a7960](d9a7960))
* Only use random port for tests ([b5225ff](b5225ff))
* Remove jwt on logout ([#36](#36)) ([88b1ac6](88b1ac6))
* Update api integration to be aligned ([ffef1ee](ffef1ee))
* Update AWS pipeline ([#28](#28)) ([a7a33fa](a7a33fa))
* upgrade express-validator from 7.0.1 to 7.1.0 ([#50](#50)) ([7c37bae](7c37bae))
* upgrade fs from 0.0.1-security to 0.0.2 ([#49](#49)) ([668c2aa](668c2aa))
* upgrade pg from 8.11.5 to 8.12.0 ([#48](#48)) ([c814616](c814616))
* userSlice typos ([0838e1e](0838e1e))

### Features

* Add login header to Home ([0c5bb27](0c5bb27))
* Create SignupForm component ([a533c18](a533c18))
* Implement PollDetail component ([#4](#4)) ([a7dc6b7](a7dc6b7))
* Implement protected routes ([#9](#9)) ([daba7c1](daba7c1))
* Implement User Session Persistence ([#19](#19)) ([db4796e](db4796e))
* Mobile Navbar with login/signup ([e42aa31](e42aa31))
* Replace temp server with api to backend ([b564fe3](b564fe3))
* Update components to use new api ([164668d](164668d))
* Update components with updated api responses ([bf917e6](bf917e6))
* Update pollService with new api calls ([8476160](8476160))
* Update userService with new api calls ([bf9cfa6](bf9cfa6))
@tristenwallace
Copy link
Owner Author

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant