koajs / session

Simple session middleware for koa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get user session data manually for socket.io?

georgyfarniev opened this issue · comments

Hello, I'm using socket.io and koa-session. How can I get user session information (same as ctx.state.user in koa middleware) in socket context, where I have only cookie session id?

commented

@georgyfarniev It's an old issue but for anyone seeing it, I use this module: https://github.com/Dongss/koa-socketio-session