iframe 中的 Safari cookie

Ser*_*hov 6 cookies safari iframe

最新的 safari 更新在 iframe 中阻止了 3rd-party cookie。( https://webkit.org/blog/10218/full-third-party-cookie-blocking-and-more/ )

他们提供了几种解决方案来解决它。我曾尝试实施 Storage Access API 解决方案,但确实喜欢结果。

任何人都可以在没有关于如何实现这一点的技术细节的情况下给出提示或示例流程:

Option 1: OAuth 2.0 Authorization with which the authenticating domain (in your case, the third-party 
that expects cookies) forwards an authorization token to your website which you consume and use to 
establish a first-party login session with a server-set Secure and HttpOnly cookie.
Run Code Online (Sandbox Code Playgroud)

firstparty.com 在 iframe 中有 3rdparty.com。根据option 13rdparty.com 通过 OAuth 授权,接收令牌。但是“将令牌转发到您的网站以建立登录会话”是什么意思?3rdparty.com 是否应该在单独的窗口中以第一方身份运行登录例程?

小智 1

他们指的是仍然让 cookie 成为第一方(在您的网站上)。例如:

用户遵循以下流程:

  1. 访问 website.com
  2. 重定向到 oauthSite.com 进行身份验证
  3. ouathSite.com 使用令牌(或代码)重定向回 website.com
  4. website.com 在服务器端代码本地设置令牌
  5. 用户现在拥有安全(仅限 https)和 HttpOnly(JavaScript 无法访问)cookie 令牌,可用于与 website.com 进行无状态交互

该网站似乎认为流程非常好: https://medium.com/@darutk/diagrams-and-movies-of-all-the-oauth-2-0-flows-194f3c3ade85