Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Stage 3 Walk-Through 1:41
- Protect Routes That Require Authentication 5:47
- Smart Redirecting 6:01
- Preserve the User State with Cookies 6:27
- Practice Cookie Manipulation 6:38
- Refactoring: ErrorDisplay Component 4:31
- Refactoring: api Helper Function 9:42
- React Router, Authorization, and Refactoring Recap 3:16
- React Router, Authorization, and Refactoring Review 5 questions

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
There's one more improvement we can make to the sign in experience. Currently an unauthorized user who tries to access a private route gets redirected to /authenticated
once signing in. A better experience would be to redirect the user back to the page they were trying to access once they're authenticated.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up