Unit 5. Authenticating user accounts
In unit 4, you built CRUD functions for the models in your application. You also learned how Mongoose and some external packages can help you define associations between your models and display data from referenced models in your browser.
In this unit, you learn about flash messaging with sessions and cookies, data encryption, and user authentication. You start by implementing basic session storage to handle small messages called flash messages between requests. Then you modify your User model to handle password encryption with the bcrypt package. After setting up your first login form, you use bcrypt to authenticate users by comparing their login data with their encrypted passwords in your database. In ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access