IFRAME cross-domain single sign-on problem

The src in the iframe points to a cross-domain url, www.a.com?ticket=xxxx to call single sign-on, the backend writes the cookie through response.setCookie, and listens to the cookie to judge whether the single sign-on is successful. The webview single sign-on is passed, but the IOS single sign-on verification fails. After analysis, it is the problem of iframe writing cookies across domains. Apple webkit permissions do it, and writing is not allowed. Solution:
1: Add: response to the server .setHeader("P3P", "CP=CAO PSA OUR");

2: The front end opens a page first, so that the cookie is written in the browser, and the iframe is loaded after success.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326307225&siteId=291194637