Problem:
After logging into my deployed Node app on elastic beanstalk, I never receive a cookie, and whenever I refresh the page through the browser, I get logged out.
Here is my express-session setup:
app.use(session({
    store: new RedisStore({
      client: redisClient,
      host: process.env.REDIS_HOST,
      port: process.env.REDIS_PORT
    }),
    secret: process.env.SESSION_SECRET,
    resave: false,
    saveUninitialized: false // No cookie received until successful login
}));
So while I am able to "log in", I am unable to have a persistent session through refresh because there is never a cookie sent back.
Possible reasons I have ruled out:
- Elasticache: I have set up an elasticache instance with redis. 
- Security Groups: I have configured its inbound security group to accept incoming TCP connections from the elastic beanstalk security group. I've even tested this by using ssh to connect to the beanstalk, installing redis-cli, and connecting to the primary endpoint successfully. 
- Load Balancer: My elastic beanstalk instance is a single node currently and does not use load balancing, but the results are the same even when I use application controlled sticky sessions load balancing. 
Do you guys have any idea what could be wrong?

