title: express-session not working in safari and IOS
body: <p>I am working on an express server, that used as an API for 3 web apps (admin, clients, and miniAdmin).</p>
  <p>The project is in staging for testing before production, but the problem is that the cookies not saving on safari on macs, and all the browsers on IOS and IpadOS.</p>
  <pre><code>app.use(session({
          name: `sid-${nconf.get('ServerConfig:projectName')}`, // The name of the session ID cookie
          cookie: {
              secure: process.env.NODE_ENV !== 'development' &amp;&amp; process.env.NODE_ENV !== 'localhost', // If true, requires HTTPS
              httpOnly: process.env.NODE_ENV !== 'development' &amp;&amp; process.env.NODE_ENV !== 'localhost',
              sameSite: process.env.NODE_ENV !== 'development' &amp;&amp; process.env.NODE_ENV !== 'localhost' ? 'none' : 'strict'
          },
          secret: ****, // Signs the cookie - changing this will invalidate all existing cookies.
          resave: false, // Forces the session to be saved back to the session store no matter what - We don't want this unless the session has changed.  
          saveUninitialized: false, // Sessions will only be created when user logs in when the value is false
          store: MongoStore.create({
              clientPromise: Promise.resolve(mongoose.connection.getClient()),
              autoRemove: 'native', // Removes expired sessions
              stringify: false // Prevents stringification of the session data
          })
      }));
  </code></pre>
  <p>Please help.
  thanks :)</p>