While working on this project, i learnt about JWT Token, JWT.sign , JWT.verify, bcrypt.hash and bcrypt.compare methods. This project has 4 routes: 1 for login, 1 for signup, 1 for protected student route, 1 for protected admin route. Once user is logged in, a jwt token is saved in cookies and using this token only we can verify the user.
While working on this project, i learnt about JWT Token, JWT.sign , JWT.verify, bcrypt.hash and bcrypt.compare methods. This project has 4 routes: 1 for login, 1 for signup, 1 for protected student route, 1 for protected admin route. Once user is logged in, a jwt token is saved in cookies and using this token only we can verify the user.