MEN Stack Session Auth
About
Welcome to our module on session authentication in Express applications. This module is designed to equip you with the essential skills to build a secure and effective authentication system. By the end, you will have a foundational understanding of session-based authentication and a functional authentication template to use in your future projects.
This module covers critical areas including secure password storage, route protection for user-specific access, and the creation of custom middleware. This module is suitable for intermediate level developers with a foundational understanding of Express servers and RESTful routing practices.
Content
| Lesson | Skills |
|---|---|
| Setup | Setting up the development environment |
| Concepts | Understand the importance of authentication |
Build and Run server.js |
Set up and run an Express server |
| Build a Landing Page | Build an Express route that renders a landing page |
Build the User Model |
Create a User model with mongoose |
| Controllers | Create and integrate a controller for auth routes |
| Build the Sign Up Page | Create a sign up page with a form |
Create a User |
Create a new user account through the sign up route |
| Build the Sign In Page | Create a page with a form for users to sign in |
| Sign Users In | Implement sign in functionality with sessions |
| Sign Users Out | Implement sign out functionality by deleting a session |
| Protecting Routes | Implement controller logic to protect routes |
| Recap | Articulate the process of session authentication |
Level Up content
| Lesson | Skills |
|---|---|
| Saving Sessions in MongoDB | Integrate MongoDB for session storage |
| Sign In on Sign Up | Implement an automatic sign-in feature during sign up |
| Protecting Routes with Middleware | Integrate custom middleware to protect routes |
Make the User Session Available to All Views |
Make user session information universally accessible |
References
📖 Reference Materials