Authentication is a vital part of any application. Authentication is a way to secure the applications we build. Every application needs some kind of mechanism for authentication. It helps us to identify the users making requests to the application server.
In this chapter, we will discuss the following topics:
- Creating a login and a register page
- Installing and configuring passport.js
- Learning more about the passport.js strategy, that is, the JSON Web Token (JWT) strategy
- Learn more about passport.js Local Strategy
- Creating necessary endpoints in the application server to handle register and login requests
We can build the user authentication by ourselves. However, it adds a lot of configuration and lot of headaches. passport.js is a package that allows us to configure authentication efficiently, taking a very small amount of time. If...