Your app was rejected: App must install successfully

Khattab
New Member
3 0 1

Hi,I'm facing an issue while approving my app. It got rejected . I have tested the app on the development store and works perfectly. 
This is the reason of rejection:

App must install successfully
App not requesting access to shop immediately after clicking "Add App". Expected OAuth to be initiated during install or reinstall at https://appstoretest5.myshopify.com/admin/oauth/request_grant but was directed to https://myapp/auth.

What should I do, I need some help here please,

Thanks in advance

Khattab
0 Likes
hassain
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 134

Hi @Khattab ,

 

You need to ensure that upon installation your public app is following the OAuth flow in order to obtain permission and an access token from the store installing your app: https://shopify.dev/tutorials/authenticate-with-oauth

 

If you use a Shopify library like the Ruby shopify_app gem or the Node shopify-koa-auth package, it will handle the OAuth flow automatically for your app. 

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Khattab
New Member
3 0 1

Hi @hassain ,
thanks for your fast response , I am using the Node shopify-koa-auth package, also I test my app in a development store , trying to install and re-install it and every time the flow of auth is good , so I don't know why my app is rejected for this reason.
If it is possible I could share my code for auth part with you to figure out the reason.
Thanks in advance

Khattab
FandyGotama
New Member
3 0 0

Yes the same thing happened to me, this is so frustrating!  i'm following example from shopify documentation using koa, tested ok in development, but always got rejected with exact same message.

0 Likes
hassain
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 134

Hey @Khattab and @FandyGotama 

 

Regarding the issues you are facing, it is important that you are making sure that upon initial installation, the oauth redirect needs to redirect the user to the URL of

https://[store-name].myshopify.com/admin/oauth/authorize?client_id={api_key}&scope={scopes}&redirect_uri={redirect_uri}&state={nonce}&grant_options[]={access_mode}. It is important to note that whatever URL you use for "redirect_uri" must also be added to your app as a whitelisted redirection URL, as defined in the Partner Dashboard. Upon hitting the installation button, the user will be redirected to that redirect_uri with the authorization code attached as a query parameter.

 

On re-installation of your app (e.g. if your app requires new access scopes now and needs the merchant to approve these access scopes), you need to make sure that the Oauth redirect needs to redirect the user to the URL of https://[store-name].myshopify.com/admin/oauth/request_grant?client_id={api-key}&redirect_uri={redirect-uri}&scope={scopes}&state={} . The same information and steps involving 'redirect_uri' also apply for this scenario as well. You could also use the "authorize" endpoint instead of "request_grant" here, but in the end you will just be redirected to "request_grant"

 

If you are still stuck and feel that it would be helpful to share your code on the forums for others to troubleshoot and debug, feel free to do so.

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
ericdude4
Shopify Partner
7 1 3

Hey @Khattab and @FandyGotama

Were you ever able to get past this issue? Currently experiencing it as well. Everything works perfectly when I test w/ my development stores, but the automated test from appstoretest5.myshopify.com keeps failing.

Eric

0 Likes
beatlecz
New Member
1 0 0

I have an app, the app has been generated by your shopify cli to prevent issues like that and we are unable to go through the robot testing process of installation. I am using the node.js koa-shopify-auth library to handle instalation and authorization. The app behaves the same as the TOP apps in the store. So I suppose you have changed the process of testing or made a bug in the koa auth library. Is there any other proved solution except writing own authorization handling? 

0 Likes