Oauth error invalid_request: The redirect_uri is not whitelisted

New Member
1 0 0

I am using shopify koa auth for authorisations  in my app and am currently getting the error `Oauth error invalid_request: The redirect_uri is not whitelisted` after I deploying on a different server. 

This issue did not exist on ngrok/on my previous server. I have already checked the whitelisted URL in the App setup. 

I found this call :
And looks like the redirect URI doesn't point to my server's url. I dived into Koa's auth modules and found that this issue might be because ctx.host is coming out to be localhost:4333 and not my server's URL. 

How can I possibly fix this without tweaking Koa Auth's code?

Shopify Staff
Shopify Staff
1071 143 189

Multiple urls can be whitelisted in the app settings. (Partner dashboard > App > Settings).

Let me know if I'm not following.