I’m having trouble getting an embedded app to work. I am trying to use Wix to serve the front-end and a flask server for the back-end. I have the oAuth flow working fine—after app install, I get the access_token and redirect to a landing page. At that point, the merchant should be able to kick off a service with the click of a button. But on button press, things get hung up on the getSessionToken call and I can’t figure out why.
I’ve followed examples to import createApp from @Shopify_77 /app-bridge and getSessionToken from @Shopify_77 /app-bridge-utils; I use createApp to create the AppBridge instance, and then call getSessionToken in the onClick handler. I don’t see anything indicating success or failure.
To make sure I was doing things properly, I tried serving a page not using wix, from flask directly, with plain html and javascript, and in that I could get the sessionToken, in Chrome at least, and complete the call to the backend. (It doesn’t seem to be working in Safari, tho, but I’ll prob write a separate post about that.)
So I’m wondering if anyone has gotten this to work with a Wix front-end piece and can help with this issue.
(Also, what’s up with the README links on npmjs for @app -bridge-utils being defunct? I get the 404 screen on github)
Any help would be appreciated—thx!