6

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

Technical requirements

Before we start, ...

Get Modern Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.