Solving the Safari ITP 2.0 Issue with PHP

Jason_Beacon
Shopify Partner
162 5 24

We're having issues with understanding the logic behind the remote redirection to the parent window after carefully reading the following documentation https://help.shopify.com/en/api/guides/itp-impact.and looking through the previous forum comments.

 

On the server-side using PHP, we set the session of the name of the store and we're able to get the session and it's working in browsers like Chrome or Firefox. Through Safari, the system is not storing any cookies and we are not able to load our application through the iframe inside the admin panel.

 

Is there anyone inside Shopify that can help us?

Decrease fraudulent orders, stop chargebacks and expand globally with Beacon. https://apps.shopify.com/beacon
0 Likes
SBD_
Shopify Staff
Shopify Staff
1044 141 183

Hey @Jason_Beacon,

 

Is your app detecting Safari 12+ users and following the flow set out in https://help.shopify.com/en/api/guides/itp-impact? These users will need to interact with your app while it's the parent window, and accept to receive cookies, before redirecting back to Shopify. At what point are you getting stuck? Would a bare bones example be helpful?

0 Likes
Jason_Beacon
Shopify Partner
162 5 24

@SBD_ 

 

Actually we managed to finally fix this issue after having look through our redirection logic and setting up cookies outside of the iframe!

 

Consider this issue resolved.

 

 

Decrease fraudulent orders, stop chargebacks and expand globally with Beacon. https://apps.shopify.com/beacon

Hi @Jason_Beacon can you please let us know how you did manage to fix this issue ? Your help will be appreciate.

0 Likes
Jason_Beacon
Shopify Partner
162 5 24

Hi @WebContrive .

 

What do you need help with exactly? We fixed our problem by detecting Safari browsers and then tweaking our redirection logic and setting a new page and setting the cookie. 

 

Jason

 

Decrease fraudulent orders, stop chargebacks and expand globally with Beacon. https://apps.shopify.com/beacon
0 Likes

Hi @Jason_Beacon ,

 

I mean what type of redirection you set in your app for cookies special for Mac Safari ?

0 Likes
ankit_jasoliya
New Member
1 0 0

I Create Shopify App in PHP, It's working good in chrome, but it's not working in Safari And Firefox Browser,

I got this error
"Unrecognized Content-Security-Policy directive 'worker-src'."

"Refused to load https://lasy-international.myshopify.com/admin/auth/login because it does not appear in the frame-ancestors directive of the Content Security Policy."

Is there anyone who can help me solve this issue?

Please let me know what integration should i do?

0 Likes