0
votes

I am working on a new app and am installing it manually by typing the URL into my web browser. This is properly bringing me to my Shopify store and is displaying the permissions screen as desired; however, when I click the 'Install app' button, I receive a page that says there is an Untrusted Connection. The URL in the browser reads:

https://.myshopify.com.myshopify.com/admin/oauth/authorize?client_id=&scope=read_customers,write_orders&redirect_uri=;

Note that the myshopify.com portion of the URL is repeated twice and the user is not sent to the redirect URI I specified.

What could be going wrong here? How can I fix this issue? Shopify doesn't really offer much in the form of support. Any help would be appreciated.

1
Can you share more info and ideally some of the code that you are using? I think that will make it easier to help.Josh Brown
I use this code from shopify example, and work fine for me.But I have to fixed for my appsmiglio

1 Answers

0
votes

I figured this out. Shopify's documentation on Oauth is incorrect. Here is the documentation page: https://docs.shopify.com/api/authentication/oauth#asking-for-permission

Shopify says to use the following code when requesting that a user grant permissions to your app:

https://{shop}.myshopify.com/admin/oauth/authorize?client_id={api_key}&scope={scopes}&redirect_uri={redirect_uri}

The 'shop' variable is sent to the app from Shopify via a query string. The 'shop' variable includes the '.myshopify.com' portion of the URL. As such, that portion needs to be removed. The new line is:

https://{shop}/admin/oauth/authorize?client_id={api_key}&scope={scopes}&redirect_uri={redirect_uri}