MyPage is a personalized page based on your interests.The page is customized to help you to find content that matters you the most.


I'm not curious

User Authentication With Express and Mongo

Course Summary

Learn how to implement a custom user authentication system that controls users access to web resources using Node.js using Express and MongoDB. The system lets users sign up, log in, and log out, limiting access to password-protected resources. Express is a popular web framework for creating MVC applications and RESTful APIs in Node.js. Express lets developers define routes and middleware for submitting and retrieving data in our database. We will leverage the document based NoSQL database, MongoDB, to store our user data by creating a user model with mongoose. Mongoose is an open source Node package for defining data models for an application and connecting to MongoDB.


  • +

    Course Syllabus

    What is Authentication?

    In this stage we will start by showing the finished project in action then walk through the source code of the starter project. Before diving into the code we will first go over what authentication is and why it is important. We will demystify the authentication process and you will gain an understanding of what is going on behind the scenes when you log into a website. After that we will jump into the code of our project and start working with models and routes. 6 steps
    • What is User Authentication? 2:14
    • Authentication and Authorization 3:11
    • Review: Authentication and Authorization 5 questions
    • Preview the Project 2:02
    • Setting Up the Project 4:53
    • Review: Node, Express and npm 6 questions

    User Registration

    Let’s continue to develop our project by adding routes and views to our Express application. We will use the default templating engine, Jade, to create a registration form. You will also learn how to tie our application into MongoDB using Mongoose, what hashing and salting are, and how they fit into an authentication process. Finally, we will improve our user model with methods and validation while using the Node bcrypt module. 11 steps

    Sessions and Cookies

    Now that we have the logic in place to create and authenticate users, how do we know if the user is logged in? Well, that is where sessions come in. A way of identifying a user will be stored in the session. We will know who the user is as they navigate through the website. Cookies can be used to store this information, and that is what we will show you how to use in this stage. 9 steps

    Improving the App with Custom Middleware

    We are almost done with our authentication system! Now that users can register and login and you have sessions to identify the user we need to think about security. Right now anyone that can access the site can navigate to any of the routes whether they are logged in or not. With middleware we can make sure that doesn’t happen. 9 steps


Course Fee:
USD 25

Course Type:

Self-Study

Course Status:

Active

Workload:

1 - 4 hours / week

Attended this course?

Back to Top

 
Awards & Accolades for MyTechLogy
Winner of
REDHERRING
Top 100 Asia
Finalist at SiTF Awards 2014 under the category Best Social & Community Product
Finalist at HR Vendor of the Year 2015 Awards under the category Best Learning Management System
Finalist at HR Vendor of the Year 2015 Awards under the category Best Talent Management Software
Hidden Image Url

Back to Top