I'm struggling a bit to get my first embedded app working properly after trying several different approaches with React and Node.
I suspect the problem is related to the authentication flow being 'in-flux' with browser changes related to cookies. I'm able to build an app and make it functional, but I run into different problems with different browsers. These don't stop me from working on the app, but I'm hesitant to go too far in development when there seem to be fundamental issues with the app loading. Some approaches work fine in Safari on Mac (but with console errors) and fail on Chrome and mobile. Some approaches work on Safari and Chrome (with console errors), but fail on mobile.
I'm still a ways out from preparing the app for publication, so I'm fine waiting a bit for the newer JWT authentication stuff to be finalized, but I want to be sure the approach I'm using to build the app is one that can be updated to work with the new stuff.
Over the last few days, I've stopped working on my app, and have been trying different tutorials to see if I can get any of them working without errors.
Here's what I've tried:
I'd prefer not to use NextJS (just a personal preference), but if that is the recommended method, I can deal with that.
So my questions are...
I realize it's not really possible to diagnose my specific problem without seeing the code. I guess right now my goal is to determine the preferred approach for developing an app (use NextJS or not?), and if the tutorial code should actually run without these errors. (Or if I should ignore the errors for now)
I've seen some people have the same issue as I don't believe the shopify cli create script had been updated
Chrome blocked cross site cookies so you'll need to add the sameSite attribute to your cookie in server.js
If you're getting an error in your browser saying shopOrigin is not loaded. Chances are the entire cookie was discarded by chrome.
Since our apps run in shopify and do not originate from the shopify domain we have some problems. But we can fix.