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 :
https://***.myshopify.com/admin/oauth/authorize*****&redirect_uri=https%3A%2F%2Flocalhost%3A4333%2Fauth%2Fcallback&grant_options%5B%5D=per-user
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?


0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 167

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

Let me know if I'm not following.

Notice; Out of office, replies will be delayed until my return. Thanks!
0 Likes