December 2019
Intermediate to advanced
474 pages
10h 3m
English
The GraphQL server for this project has already been set up to handle authentication and will return a JWT token when the correct user information has been sent to it. When the user wants to check out the cart, the application will look for a JWT token in the local or session storage and redirect the user either to the checkout page or the login page. For this, private routes should be added to react-router, which are only available when the user is authenticated.
Adding a private route requires that we make the following changes:
Read now
Unlock full access