Sharing Sessions with Express and SocketIO - Part 12

preview_player
Показать описание
We setup socketio so that we can access the user sessions which were stored with redis and express.

Code 👨‍💻
Рекомендации по теме
Комментарии
Автор

It still show undefined, is it because i didnt use store?

puripuriprisoner
Автор

Hey, I did it exactly like you did and I also saw it in a lot of other posts in this way, but for some reason, I only get this in socket.request.session

Session {
cookie: {
path: '/',
_expires: null,
originalMaxAge: null,
httpOnly: true,
secure: true,
sameSite: 'strict',
domain: 'localhost'
}
}

Do you have any idea how to get the other values I actually saved in the session? I am also using the following function to reload the session, to make sure updates to the session are available, but with no luck.

(err) {

});

kevinhertwig