Closed felixchan closed 13 years ago
Probably this link can help you to build a workaround and to probably propose an implementation for a simpler API to now.js. Remember to look also Update 2 and Update 3 where Justin Slattery implements the authenticated sockets.
@felixchan
You can access the session data by finding the connection sessionId:
var id = unescape(this.user.cookie['connect.sid']));
With which you can access the session date if you are using sessions in express.
Because of the different paradigm of request / response as opposed to realtime data communication, it's not possible to access the request/response object (as there is no concept of request or response). Use the technique above you can access the session data store.
Closing
It's really painful not to be able to access the user's session.