I\'m (almost) successfully using Node.js with Express and Redis to handle sessions.
The problem I\'m having is that the session is not kept when I use res.redirect
Alright, I found the solution. The problem is that the time in maxAge
was added to the current date. So, in the browser side, the cookie was set to expire at the GMT time shown.
The problem was the following : I use a virtual machine to test node.js, and, you know... sometimes, you suspend your machine.
Well, what happened is that the machine's time was two days late. So, whenever the cookie was set on the server side, the client side thought the cookie was already expired, since my host machine was not two days late.
Another stupid outcome.