Broken OAuth: "&code=" missing from redirect URL

PData
New Member
1 0 0

I am following through the steps on https://shopify.dev/tutorials/authenticate-a-custom-app-with-oauth and https://shopify.dev/tutorials/authenticate-with-oauth attempting to authenticate a custom app to a test store, and came across an error in the Shopify OAuth API. I am performing OAuth step 2 by clicking the "Merchant install link" as seen here:

Screen Shot 2020-05-20 at 6.14.53 PM.png
When following that link, no install prompts are shown. Instead I am immediately redirected to my redirect URL: https://example.com/?hmac=c28280aa7352f3374daa576ea4b7e77e3127f9bca5bc37261e7a159501d61c37&shop=pd-t...

 

In the linked guide above, Step 3 shows:

Screen Shot 2020-05-20 at 6.21.59 PM.png

But this is NOT the case. As my redirect URL shows, the 

code=

 is missing from the URL. Therefore the OAuth authentication can not be completed. Please advise.

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

Hi @PData ,

 

What you are seeing is the expected use case for Custom Apps being installed from a single store. Here is very helpful previous forum post that addresses this and explains the remaining steps you need to complete in order to complete the OAuth process and get your permanent access token: https://community.shopify.com/c/Shopify-APIs-SDKs/Shopify-Custom-App-Oauth-Missing-code/td-p/678295

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