The iframe inside the shopify shows message 'forbidden'

Ruzen
New Member
6 0 0

Hey Shopify Community,
    I am currently facing a problem with my public app using Shopify App Bridge. I wish if anyone had faced my problem before or any suggestions, that I can take would be highly appreciated. Thank You!

So basically, what I have been doing is,

I kept my authentication with OAuth codes(https://shopify.dev/tutorials/authenticate-with-oauth)  in a AWS Lambda function without the use of Shopify App Bridge. So, whenever someone tries to install my app, the lambda function runs and redirects to the OAuth screen. After the user clicks on 'Install App' according to the Shopify rules for submitting the Public App(https://shopify.dev/concepts/app-store/getting-your-app-approved/app-requirements), the document says,
If your app uses embedded app methods, then it must do so consistently. This means that it must provide a consistent embedded user interface experience that begins after authentication.

In my case, what happens is when the user clicks on 'Install App' button, it first redirects to the app but different page. Not inside the iframe of the Shopify Admin. But, when I open the app after it is already installed in the admin, it opens up perfectly inside the Shopify Admin. 

So what we did was we made the Lambda function of OAuth to redirect to the frontend of the app. The frontend of the app uses Shopify App bridge's Redirect function and was able to redirect to the Shopify admin but the app's iframe shows the message as forbidden. 

Could  anyone please help me about how I be able to make the iFrame show the app after the installation?

 

0 Likes