Adding Authentication with JWT
After developing and deploying our first full-stack application, we now have a way for anyone to create posts on our blog. However, since the author is an input field, anyone could enter any author, impersonating others! That’s not good. In this chapter, we are going to add authentication with JSON Web Token (JWT) and functionalities to sign up and log into our application by adding additional routes using React Router.
In this chapter, we are going to cover the following main topics:
- What is JWT?
- Implementing login, signup, and authenticated routes in the backend using JWT
- Integrating login and signup in the frontend using React Router and JWT
- Advanced token handling