Node.js login and generate JWT Token using HTTPOnly Cookies. Login using JWT (JSON Web Token) which is the stand method for SPA Authentications. Did not use traditional “Bearer method” but instead login using HttpOnly cookies which is a more secure authentication.
For development, you will only need Node.js and a node global package, Yarn, installed in your environement.
-
Clone the repository
$ git clone https://github.com/bella77-69/auth-api
-
Install dependencies
cd <project_name>
npm install
- Build and run the project
npm start
Navigate to http://localhost:3000