Chapter 8: Guarding Routes and Testing Authentication

In the previous chapter, we saw how to use Apollo Client to send queries and mutations to our previously implemented backend API. We integrated Apollo with our Angular frontend, then implemented the required services and components for user authentication.

We also added functionality to our application header to allow users to navigate between pages such as the profile, home feed, and login pages. We added the necessary functionality to allow users to search for other users on the network using a search bar in the header.

In this chapter, we will continue implementing our auth system by guarding the necessary route(s) against unauthorized access, sending the JWT with the API requests, and ...

Get Full Stack Development with Angular and GraphQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.