title: SameSite Cookie Header and Websocket not working
body: <p>Before we set sameSite: None our game did not work on any of the 3rd party sites. As can be seen in this video: <a href="https://youtu.be/_AYCvCrZyDk" rel="nofollow noreferrer">https://youtu.be/_AYCvCrZyDk</a></p>
  <p>The website loads but web-socket can not create a connection so everything is shown as <code>loading...</code> but the connection isn't established.</p>
  <p>Then we added a <code>sameSite: 'None'</code> as can be seen below and everything started working.</p>
  <pre><code>export function setJwtCookie(res, userId: number) {
      const payload: IJwtPayload = {userId: userId}
      const newToken = jwt.sign(payload)
      res.cookie('jwt', newToken, {httpOnly: true, secure: true, maxAge: COOKIE_TTL, sameSite: 'None'})
  }
  </code></pre>
  <p>But now small number of our players are complaining that they have the above problem if they are playing both on our site or 3rd part sites.</p>
  <p>They tried different browsers, different wifi connections with the same computer but couldn't get it to work. When we upload a version without <code>sameSite: 'None'</code> they are able to play fine. So what is going on here? How can we make everyone play?</p>
  <p>Here are the versions for convenience &amp; testing. Thanks</p>
  <ol>
  <li>Version with <code>sameSite: 'None'</code> included -&gt; colonist.io</li>
  <li>Version with <code>sameSite: 'None'</code> not included -&gt; hexs.io</li>
  <li>Iframe of colonist.io version -&gt; <a href="https://iogames.space/colonist-io" rel="nofollow noreferrer">https://iogames.space/colonist-io</a></li>
  </ol>