Skip to content

Gusjafo/jwt-login-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jwt-login-sample

Example of registration and login using jwt token in Nodejs.

MongoDB is used as the database to store Users

In it, the users /register are registered and access is granted or not to the users /login

Once authorized (correct email and password), you access the protected page /welcome.

Libraries used

jsonwebtoken to generate and verify token.

bcryptjs to hash user password.

login