App reviews, troubleshooting, and recommendations
Hi, I am building a shopify embedded app that should be able to authenticate bing ads users.
I am using React as a frontend technology and Node js as a backend, and I am using express-session.
However, the cookie is not received by the Iframe where the embedded app resides but it is received by my browser.Why is that happening?Can you suggest me possible solutions?
Humongous Thanks in advance!
Solved! Go to the solution
This is an accepted solution.
I assumed you were using the embedded content in the front end.
I thought that limitation was only for back-end apps.
But anyway.
Try to use JSON Web Tokens: https://shopify.dev/apps/auth/oauth/session-tokens/getting-started
OR
Try to configure CORS for each of your merchants, so each instance of your app could render its assets properly.
If the solution is hosted in Google Cloud I believe that you have to configure a CORS Policy per merchant, and that's a bucket wide measure, I don't know if AWS or Azure have different directives.
Learn how to set and manage authentication with 3rd. party cookies.
If you need a cookie, and you need to set it through an iframe that is in another domain, that would be a 3rd. party cookie.
https://stackoverflow.com/questions/2117248/setting-cookie-in-iframe-different-domain
https://www.codeproject.com/Articles/5330276/Cross-Domain-Embedding-Making-Third-Party-Cookies
https://medium.com/trabe/cookies-and-iframes-f7cca58b3b9e
Hi,
Thanks for the answer I tried your solutions and a few more.
However I still didn't manage to set a cookie.
Could the issue be that shopify forbids third-party cookies?
This is an accepted solution.
I assumed you were using the embedded content in the front end.
I thought that limitation was only for back-end apps.
But anyway.
Try to use JSON Web Tokens: https://shopify.dev/apps/auth/oauth/session-tokens/getting-started
OR
Try to configure CORS for each of your merchants, so each instance of your app could render its assets properly.
If the solution is hosted in Google Cloud I believe that you have to configure a CORS Policy per merchant, and that's a bucket wide measure, I don't know if AWS or Azure have different directives.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025