Summary
In this chapter, we had the opportunity to learn how authentication and authorization work in a web application. We implemented the authentication part using JWT and the authorization part using a custom middleware.
Additionally, we explored in detail how JWTs work and how to implement them in a Node.js application.
Finally, we added authentication and authorization functionalities to our web application, so we can now authenticate users and we can ensure that the users can only modify/delete the whispers that they created.
In the next chapter, we are going to learn in more detail how to properly manage errors in our web application and in any Node.js application or library.