Summary
In this chapter, we learned about authenticating users and then creating a cookie to store logged-in user information. We also introduced CurrentUser
as a request guard that works as authorization for certain parts of the application.
After creating authentication and authorization systems, we also learned about API endpoints. We parsed the incoming request body as a request guard in an API and then created an API response.
Finally, we learned a little bit about the JWT and how to use it to protect API endpoints.
In the next chapter, we are going to learn how to test the code that we have created.