Going from Public App to Custom App - Rookie error I think!

digitalcrate
Shopify Partner
1 0 0

Hi

 

So, I have developed an app which has vastly been built using tutorials as I am new to Shopify.  Now, I built this out of a developer account setting it up as a "public app".  After rigorous testing, it wall works perfectly so wanted to install it on my clients store.  Once running the install url it got to the install page and infomred me that it needed to go through code approval (even though its not going in the app store and only being used on one client site!)

 

So, after speaking to Shopfiy, they told me I needed to create a "Custom app" in my developer account which would bypass the code review stage, however, this produces a custom install link and I believe uses oAuth which my install.php file doesnt??

 

So heres my question (finally!), how/where do I add code for oAuth to enable my app to be installed using this method???  Can anyone help, are there code examples anywhere?

 

Any help or guidance would be much appreciated, thank you for your time.

0 Likes

Are you getting a specific error message with your private app that you didn't get with your public app?

 

https://help.shopify.com/en/api/getting-started/authentication

https://help.shopify.com/en/api/getting-started/authentication/custom-authentication

  • Promo Banner app - promote your products and create a sense of urgency with flash sales timer for free!
  • Developing custom apps contact help@applabs.dev
0 Likes
achieveapplabs
Shopify Partner
472 36 74

The OAuth process is simply don't worry. Here's a link to some actual PHP code.

 https://github.com/Shopify/shopify-php-app/blob/master/src/public/index.php

 

This line specifically:

 

https://{$shop}/admin/oauth/authorize?client_id={$apiKey}&scope={$scope}&redirect_uri={$redirectUri}";

To begin the process you should redirect the user to the above URL with those parameters set by you. Following this you're going to get a response from Shopify which you need to validate and finally you can authenticate and redirect to a protected path. Hope this helped and all the best don't give up.  

Install Approovly to create and track order approvals | We want to hear from you hello@achieveapplabs.com | Follow us on Twitter @achieveapplabs | Custom Shopify Apps achieveapplabs.com
0 Likes