DIVE INSIDE
In order to practice user authentication, I set out to build an app that would change in functionality if the user is logged in and according to different authentication levels. To keep it simple, authentication levels are granted if the user enters a secret phrase on the appropriate page.
In implementing this, I went with a MVC structure using Express.js, Node.js, Mongoose and pug. In addition to restricted access to the mongoDB database, I also set conditional statements in the pug templates for different displays depending on the access level. To make the authentication more secure, I also used bcryptJS to hash and salt the users’ passwords. This means that not even I know any account passwords on this site, so feel free to make it as skeptical as you’d like!