Php app gets exit from embedded view after installation,

pitscustomer
Shopify Partner
1 0 0

Upon installing the app, I am being redirected to a non-embedded version. When accessing the app from the installed apps list, the app is redirecting to the embedded version. Using Codeigniter framework and below specifying the corresponding code.

       $shop         = $this->input->get('shop');
        $install_url  = "https://" . $shop . "/admin/oauth/authorize?client_id=" . SHOPIFY_API_KEY . "&scope=" . SHOPIFY_SCOPES . "&redirect_uri=" . urlencode($redirect_uri);
        @header("Location:".$install_url);
Reply 1 (1)

Luke_K
Shopify Staff
402 66 100

Hey @pitscustomer 

I'm not familiar with the CodeIgnitor framework or PHP but please ensure you're following the oAuth path that is mentioned here.

It does sound that you're on the right path from the docs :

"it is critical that the initial OAuth redirect to Shopify occurs at the parent level, escaped from the iFrame".

Check out the docs for next steps.

- API Support.

 

| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!