I wanted to save someone the pain because I couldn't find a similar SO question: in case you have everything correct mentioned in Nate Anderson's answer and still cannot get the cookie to be set, and in my case the Set-Cookie response header was not sent from the server, it can potentially be that your server is behind a proxy and therefore you need to account for that. In my Express.js server I used app.use("trust proxy", 1) as mentioned here https://github.com/expressjs/session/issues/983 and it was solved.