Flotype / now

NowJS makes it easy to build real-time web apps using JavaScript
http://www.nowjs.com
MIT License
1.91k stars 175 forks source link

Expose client cookie to functions #87

Closed sridatta closed 13 years ago

sridatta commented 13 years ago

There is no easy way to access the client's cookie information when calling functions in NowJS. Potential use case: storing a session ID hash in the cookie so function calls can be associated with a particular authenticated user session.

(cc @tglines)

sridatta commented 13 years ago

Fixed as of https://github.com/Flotype/now/commit/152d7924065ba1f7ff01f8a8f6ce855d251591d7

Client's cookie is available in remote function calls through this.user.cookie . It is a string (so you must parse it yourself) and it is not possible to write/update the cookie back to the client.