title: How to fix "This Set-Cookie was blocked due to user preferences" in Chrome? (Stackoverflow SSO Login / Ajax CORS request)
body: <p>It seems that the recent update of Chrome to version 83.0.4103.116 brought a change to the Cookie handling.</p>
  <p>I am providing a single-sign-on for my users that signs them in into several websites. Similar to Stackoverflow I am doing an <a href="https://meta.stackexchange.com/a/309823/227942">AJAX request</a> with Jquery:</p>
  <pre><code>crossDomain: true, 
  xhrFields: { withCredentials: true },
  </code></pre>
  <p>And in PHP I allow the domain:</p>
  <pre><code>// needed for cross-domain request
  header('Access-Control-Allow-Origin: https://www.example.com');
  header('Access-Control-Allow-Credentials: true');
  </code></pre>
  <p>However, now it does not work anymore.</p>
  <p>In the dev console I found a new warning with the tooltip:</p>
  <blockquote>
  <p>&quot;This Set-Cookie was blocked due to user preferences&quot;</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/06A9q.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/06A9q.gif" alt="chrome warning tooltip" /></a></p>
  <p>How to fix this?</p>
  <br>
  <br>
  <p>Update:</p>
  <p>I just see that the Single-Sign-On of Stackoverflow is not working anymore either!</p>
  <p><a href="https://i.stack.imgur.com/kJX1w.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kJX1w.png" alt="enter image description here" /></a></p>
  <br>
  <br>
  <p>PS: A <a href="https://stackoverflow.com/q/61123108/1066234">related question</a> suggest to tell your users to change the Chrome settings, from my POV, I'd like to avoid this. Just imagine SO informing millions of users to enable the Cookies to do a single-sign-on...</p>