In this chapter, we learned how to handle authentication and manage the global state of the application.
We started with an overview of the authentication system and how it works. Then, we implemented authentication features such as login, logout, and getting the authenticated user info. We also built the
Protected component, which controls whether the user is allowed to see a page based on their authentication status.
Then, we built a toast notification system where the user can trigger and display notifications from anywhere in the application. The main goal of building it was to introduce Zustand, a very simple and easy-to-use state management library for handling global application state.
In the next chapter, we will learn how to approach testing the application with unit, integration, and end-to-end tests.