Working Authentication example on a node server using Passport and MySQL
I have used MySQL here
Create the database and the user table using the following command
mysql> CREATE DATABASE auth_demo;
mysql> USE auth_demo;
mysql> CREATE TABLE users(username VARCHAR(50), salt VARCHAR(150), hash VARCHAR(150));
To install this example on your computer- clone the repository and install dependencies.
$ git clone https://github.com/lusar98/Authentication.git
$ cd Authentication
$ npm install
$ node app.js
Open a web browser and navigate to http://localhost:3000/.