Authentication in Node.js
In this article we will be learning how to perform authentication in Node.js using JWT. Authentication is a process of identification of user’s/device identity. A common example of this is entering a username/email and password when a user is trying to login. The authentication process starts when a user’s/device credentials are correct. You must have already familiar with authentication because we all do this in our daily routine. What is 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. This information can be verified and trusted because it is digitally signed. JWTs can be signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA or ECDSA . Prerequisites To follow along with this tutorial, you will need: A working knowledge of JavaScript. A good understanding of Node.js. A basic understanding of...