关于chrome:Chrome-80之后-iframe不支持发送第三方cookie的问题
最近在我的项目中遇到了一个问题,我的项目里有一个受权页面是在快手页面进行受权的,这个受权页面放在了iframe当中来做。客户反馈关上受权页面之后,快手间接进入登录界面,而且在里面的页面曾经登录的也被革除掉登录状态进入登录页面了。 问题剖析首先在本人的页面点击受权发现没有问题,在共事的电脑上却呈现同样的问题。而且都是chrome 84,win10零碎。 发现在控制台有这样几条信息: A cookie associated with a cross-site resource at http://kuaishou.com/ was set without the `SameSite` attribute. It has been blocked, as Chrome now only delivers cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.{loginUrl: "https://ad-login.e.kuaishou.com?sid=kuaishou.ad.ds…owUrl%3Dhttp%253A%252F%252Fad.e.kuaishou.com%252F", result: 109, error_msg: "网络连接失败,请刷新以后页面。"}看到快手在受权中应用了不通的几个域名,而后在外面获取不到登录信息。想起来2月份看到说chrome不反对第三方cookie的事件。然而还不能确定,因为在我的电脑上也有这条信息。 搜了搜iframe外面怎么设置反对第三方cookie获取的办法,然而没有找到。 只能是服务端设置:SameSite=None; Secure 才能够。因为是第三方的页面,所以也搞不了。 ...