My goal is to enhance the user experience by retrieving their profile from the mongodb database when they visit the page, and then updating their session with this information.
Currently, I am utilizing the following packages for managing sessions:
- express-socket.io-session (enables cookie access via socket.io)
- express-session
- connect-mongo (allows session storage in a mongodb database)
Below is my attempt to update the user's cookies:
req.session.reload(function(err) {
// session updated
})