Great job! We’ve covered the basics of using
express-session to implement sessions. We’ve learned:
How to use
express-sessionsin order to create our own middleware for sessions.
How certain properties work in the
sessionmiddleware, such as
How to configure cookies in the middleware, along with specific properties that help with session security.
How to store a session in memory
How to incorporate sessions into an authentication process.
How to access and modify session after user is authenticated
If you’d like to experiment more with sessions, we’ve provided you with the simple application from the last few exercises so you can handle authentication and/or create new properties within a session object.
To run the application with its full effect, we recommend coding and testing it in your local Node environment. We’re attaching a zipped file of the project here.
For further information refer to the main