title: Cannot get a cookie from when I am storing a session into redis
body: <p>I am trying to do Ben Awad's fullstack tutorial. around the 1:56:00 I was trying to login on the backend with graphql, but I am not receiving a cookie for my session, so I cannot stay logged in.</p>
  <p>This is the code below, and I am sure I am connected to redis. If anyone know how to possibly get the cookie on my browser that would be perfect. Thank you!</p>
  <pre><code>import &quot;reflect-metadata&quot;;
  import { MikroORM } from &quot;@mikro-orm/core&quot;;
  import { __prod__ } from &quot;./constants&quot;;
  import microConfig from &quot;./mikro-orm.config&quot;;
  import express from &quot;express&quot;;
  import { ApolloServer } from &quot;apollo-server-express&quot;;
  import { buildSchema } from &quot;type-graphql&quot;;
  import { HelloResolver } from &quot;./resolvers/hello&quot;;
  import { PostResolver } from &quot;./resolvers/post&quot;;
  import { UserResolver } from &quot;./resolvers/user&quot;;
  import { MyContext } from &quot;./types&quot;;
  import redis from &quot;redis&quot;;
  import session from &quot;express-session&quot;;
  import connectRedis from &quot;connect-redis&quot;;
  
  const main = async () =&gt; {
    const orm = await MikroORM.init(microConfig);
    await orm.getMigrator().up();
  
    const app = express();
  
    let RedisStore = connectRedis(session);
    let redisClient = redis.createClient({
      host: &quot;localhost&quot;,
      port: 6379,
    });
    redisClient.on(&quot;error&quot;, function (err) {
      console.log(&quot;Could not establish a connection with redis. &quot; + err);
    });
  
    app.use(
      session({
        name: &quot;qid&quot;,
        store: new RedisStore({
          client: redisClient,
          // disableTouch: true,
        }),
        cookie: {
          maxAge: 1000 * 60 * 60 * 24 * 365 * 3, //3years
          httpOnly: false,
          sameSite: &quot;lax&quot;, // protecting csrf
          secure: __prod__, //cookie only works in https
        },
        saveUninitialized: false,
        secret: &quot;askdjajshdfgkjha&quot;,
        resave: false,
      })
    );
  
    const apolloServer = new ApolloServer({
      schema: await buildSchema({
        resolvers: [HelloResolver, PostResolver, UserResolver],
        validate: false,
      }),
      context: ({ req, res }): MyContext =&gt; ({ em: orm.em, req, res }),
    });
  
    apolloServer.applyMiddleware({ app });
  
    app.listen(4000, () =&gt; {
      console.log(&quot;server started on localhost:4000&quot;);
    });
  };
  
  main().catch((err) =&gt; {
    console.log(err);
  });
  </code></pre>