Foreword:
Recently, some single sign-on projects always refresh the page after being started locally. Looking at the network, I found that the login interface does not carry cookies, causing the login interface of the locally started project to always get 302. Originally, by accessing chrome://flags/, search for SameSite
by Default cookies and setting them to disabled can solve the problem of cookie portability, but when I went in, I found that the SameSite by default cookies were gone. Later, I checked and found that both Google Chrome and Microsoft Edge browsers had been updated, causing the SameSite by default cookies to be removed.
solution:
- Right-click the Google Chrome and Microsoft Edge browser shortcuts and click "Properties"
- At the end of "Target(T)" add
--flag-switches-begin --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure --flag-switches-end
Reference: https://gadzan.com/chrome-edge-91hou