Authentication Mechanism in front end && backend

Using React and react-router on the front-end supported on the back-end with a node.js application using Express and MongoDB with Mongoose.

Why we focus on the authentication in our web application ?

authentication allows users who have identify to access specifically content on our web app. It is safety and necessary to protect routes from the users who haven't login to our app (guest).

BTW, security is one of the most crucial requirement that client has been provided to us.

What & Why JWT ?

JWT (JSON Web Tokens)

JSON Web Token (JWT) is an open standard (RFC 7519) for securely transmitting information between parties as JSON object.

Passport - JWT :

A Passport strategy for authenticating with a JSON Web Token

Untitled

JWT.IO - JSON Web Tokens Introduction

Untitled

How JSON Web Token(JWT) authentication works?