I have a simple app set up to display ‘Hello World’ but I have been bashing my head for a few days trying to get App Bridge working. Can anyone provide a simple Node/React application using App Bridge? Specifically I would like to use “Cart” actions but any simple example would help me really! For example, fetching “Features”.
And index.html calls index.js with the following authentication code from the documentation:
var AppBridge = window["app-bridge"];
var actions = AppBridge.actions;
var createApp = AppBridge.createApp;
const apiKey = "
I have attached the complete code below. This OAuth problem only happens with the app-bridge. The site loads fine if index.js is not loaded. I have also tried putting the authentication into a separate function that I trigger with a button (to avoid an authentication loop), but the same problem occurs.
Please advise on how I should modify the code. Thanks.
Index.js is an extension of the authentication from documentation:
var AppBridge = window["app-bridge"];
var actions = AppBridge.actions;
var createApp = AppBridge.createApp;
const apiKey = "
If index.html does **NOT** load index.js, I don't get any error but I get OAuth error when I try to use App Bridge. Please advise on how I should modify the code. I have also attached the complete code below.