It seems that the recent update of Chrome to version 83.0.4103.116 brought a change to the Cookie handling.
I am providing a single-sign-on for my users that signs them in into several websites. Similar to Stackoverflow I am doing an AJAX request with Jquery:
crossDomain: true,
xhrFields: { withCredentials: true },
And in PHP I allow the domain:
// needed for cross-domain request
header('Access-Control-Allow-Origin: https://www.example.com');
header('Access-Control-Allow-Credentials: true');
However, now it does not work anymore.
In the dev console I found a new warning with the tooltip:
"This Set-Cookie was blocked due to user preferences"
How to fix this?
Update:
I just see that the Single-Sign-On of Stackoverflow is not working anymore either!
PS: A related question 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...