USER AUTHENTICATION USING PASSPORT-JWT STRATEGY IN NODEJS.

This article is written to help developers write applications with user authentication using node and two of its packages. We will discuss the usage of “Passport” and “bcrypt” packages as middleware for programming user authentication using Node.js. The authentication middleware which we’ll examine is the Passport package since it works well in Node.js “Express” package based applications, allowing users to log in with username and password. The usage of passport for username and password verification with a self-generated JSON Web Token(JWT). Passport can generate, extract, and validate these web tokens with an expiration…


INTRODUCTION
This article uses Express Js for handling Hypertext Transfer Protocol(HTTP) requests and MYSQL for storing data. Node Js is a platform used for building server side application using Javascript. Express is a flexible Node Js web application framework and provides a set of robust features for web and mobile applications.Developers do not need to build everything from scratch. Our first focus is ExpressJs which is one of the most used packages by developers build web APIs. Lastly, we focus on sequelize which is used to simplify the communication between NodeJs and MYSQL.

REQUIREMENTS

  • Basic Javascript Knowledge
  • Install Node.Js
  • Install…


DATABASE CONNECTION USING EXPRESS AND SEQUELIZE: PART 2

PART 2A: USING EXPRESS GENERATOR

STEP 1

Open command prompt.

Lydia Tosin

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store