document.cookie always return empty string

leobarrameda
New Member
2 0 0

Hi guys, 

I been developing an app for shopify that uses document.cookie api. When I access it on my site it is working - calling document.cookie return all the cookie in the scope but when it is called via iframe on shopify admin dashboard - it is return empty string. May I know if you have experience this and what have you done to fix it? 

Best Regards, 

- Leo 

0 Likes
olivert
Explorer
51 11 15

i've seen issues with cookies due to the missing sameSite cookie attribute.

i.e browsers block cross site cookies now for security reasons. 

does the below help?

https://community.shopify.com/c/Shopify-APIs-SDKs/shopOrigin-undefined-on-Cookies-get-quot-shopOrigi...

0 Likes