App review - OAuth redirect request fails to escape the iframe and redirect to embedded app version

App review - OAuth redirect request fails to escape the iframe and redirect to embedded app version

prediko
Shopify Partner
2 0 1

Hello everyone, we've finished building our app and are undergoing the review process. We still have one blocking point and the reviewer redirected us here to help us resolve our issue.

 

The blocking point is the following : "Your OAuth redirect request fails to escape the iframe and doesn't successfully direct to your embedded app's version."

 

Would be amazing if someone could help us see more clearly in what to do.

 

We have used the Shopify CLI to generate our react / node and here is the behaviour we have setup: • Upon installation, the following routes are being called:

// Set up Shopify authentication and webhook handling
app.get(expressShopify.config.auth.path, expressShopify.auth.begin());
app.get(
expressShopify.config.auth.callbackPath,
expressShopify.auth.callback(),
expressShopify.redirectToShopifyOrAppRoot()
);

• Which then redirects our user to our embedded app within the Shopify interface (https://connect.prediko.io/). Which uses AppBridge with the following configuration:

return {
host,
apiKey: process.env.SHOPIFY_API_KEY,
forceRedirect: true,
};

• Then, this embedded page checks if the user has setup its Prediko user and account (credentials, settings, ...). If it isn't the cas, here is the code of our react component that is executed :

import { Redirect } from '@shopify/app-bridge/actions';
const redirect = Redirect.create(app);
redirect.dispatch(Redirect.Action.REMOTE, {
newContext: true,
url: decodeURIComponent(redirectUrl) // which is 'app.prediko.io'
});

Besides changing the behaviour of the redirect by switching the newContext to false, or completely removing it, I'm uncertain of what we should do. Unless we misunderstood the allowed use of the embedded app (https://shopify.dev/docs/apps/platform#embedded-app-pages) "You can embed your app user interface, or parts of your app user interface"

 

We use AppBridge and the embedded function to help our users logging in our App and want to use the embedded app to display weekly reports in the future. Could you assist me in resolving this ?

Replies 0 (0)