Trying to grok this e-commerce scenario...
- I build an amp product page in amp that has the new amp-form
- The add to cart button is an XHR to my backend (that is session based, using cookies by default)
- User searches for product and results take them to my amp product page, but they've never been to my site
- They submit the add to cart form
- the CORS preflight makes it's way to my backend, and i set all the correct allows as per https://github.com/ampproject/amphtml/blob/master/spec/amp-cors-requests.md
- Now the actual request is made... backend initializes a session, returns session identifier as a cookie, but since user never went to my site...just the google amp cache it's treated as a 3rd party cookie and browser discards it (cause user disables 3rd party cookies)
- users session is lost, as is their add to cart action
So the question is, how do i keep the session around and the item in the cart? Am i missing something? is there a trick i'm not seeing?
appreciate any insights.