JWT Authentication API Basics

  • This is a simple API that uses JWT authentication. It is meant to be used as a starting point for a project that requires authentication.
  • Using MongoDB as database with mongoose as ODM library.
  • Using ExpressJs as bodyparser to get the data as Json format.
  • Using Joi npm package for validation. (use "npm i joi" to install it).
  • Using bcryptjs npm package for hashing the password. (use "npm i bcryptjs" to install it).
  • Using jsonwebtoken npm package for generating the token. It creates a token and we store and just show it to tell that we are already logged in So, do not need to login again and again.(use "npm i jsonwebtoken" to install it).