Github:https://github.com/mehulk05/Blogapp-using-MERN
Live Demo:https://mehulk05.github.io/Blogapp-using-MERN/
JSON Web Token is one of the best standards to implement an authentication system in your MERN stack app. In this article, we will just have look at authentication in the MERN stack app using JWT.
JSON Web Token (JWT) is an open standard ( RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object
Here are some scenarios where JSON Web Tokens are useful:
In its compact form, JSON Web Tokens consist of three parts separated by dots (.
), which are:
Therefore, a JWT typically looks like the following.
xxxxx.yyyyy.zzzzz
Because JWTs can be signed — for example, using public/private key pairs — you can be sure the senders are who they say they are. Additionally, as the signature is calculated using the header and the payload, you can also verify that the content hasn’t been tampered with.
#react #nodejs #authentication #jwt