Skip to content Skip to sidebar Skip to footer

Uniquely Identifying A User From A Post Request With Node.js

I'm making a browser game that utilizes voice communication, to record audio in the browser I'm using wami-recorder which uses flash to send a POST request to the server with the r

Solution 1:

Your usual options are:

  1. To include a piece of data in each post request that identifies the user
  2. To have the user "login" and set a cookie that identifies the user and the cookie should be sent automatically with the post request so you can then examine the cookie server-side to see which user is sending.

If, as you say in your comments, you can't influence the data that is sent with the request, then you would want to set a cookie that identifies the user before the request is sent and the browser will automatically include the cookie with the request and then your server-side code can examine the cookie that comes with the request to see which user it is. This is the usual way that one "logs in" to a web-site and the server then keeps track of which user a given request is from.

Post a Comment for "Uniquely Identifying A User From A Post Request With Node.js"