Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Adding User Login 1:16
- Tracking Visits With Sessions and Cookies 2:22
- Working with Sessions in Express 3:28
- Review: Sessions, Cookies and Express 5 questions
- Adding Log In Routes 1:39
- Creating a Login Form With Pug (Jade) 2:48
- Authenticating the Username and Password 7:28
- Creating the Profile Route and Page 3:53
- Review: Login Routes 5 questions
Well done!
You have completed User Authentication With Express and Mongo!

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Learn how to install express-session and add it to your application.
Resources
Installing express-session
npm install express-session
Adding express-session to an app
var session = require('express-session');
app.use(session( {
secret: 'treehouse loves you',
resave: true,
saveUninitialized: false
}));
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Jef Davis
29,162 Points2 Answers
-
nfs
35,526 Points2 Answers
-
Krystal Jackson
8,598 Points2 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up