/JWT_Example

A simple application using bcrypt to encrypt passwords via login. Then generate a JSON Web Token on login for that use to access a secure API. In this example it just shows the user's information.

Primary LanguageHTML

JSON Web Token Example

This application uses Node JS, Express, and MySql

Imgur Imgur

Getting Starting

  • Git clone https://github.com/tance77/JWT_Example.git
  • cd to the newly cloned directory
  • yarn install (npm install, should work as well, but yarn is much cleaner)
  • yarn add global mysql sequelize sequelize-cli
  • sequelize db:migrate (if this fails, you may need to create the schema jwt_example then re-run this command)
  • npm start
  • From your browser navigate to localhost:3001 or 127.0.0.1:3001 (Port can be changed in /bin/www line 16)

After completing the above steps you should be able to play around with some of the features on the website. The information you get using the JSON Web Token is the user's information, not including their password.