Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Oauth error invalid_request: The redirect_uri is not whitelisted

Solved

Oauth error invalid_request: The redirect_uri is not whitelisted

jamesn92
Shopify Partner
2 1 0

Running into this issue with the completely vanilla tutorial app. I have not edited any code. 

 

Steps to reproduce: https://shopify.dev/apps/getting-started/create running on Mac (v12.1, M1 processor) 

Ruby and Shopify CLI both installed fresh via Brew. Ngrok is setup and authenticated locally.

 

After serving the demo app if I follow the ngrok link I hit the classic Oauth error invalid_request: The redirect_uri is not whitelisted. Reproduced error in chrome, safari, chrome incognito and safari private browsing and also chrome/safari on iOS. 

 

What do I need to do to get the demo app to work? The redirect URI is automatically whitelisted in app configuration settings and looks correct, yet I keep running into this error.

 
Accepted Solution (1)

jamesn92
Shopify Partner
2 1 0

This is an accepted solution.

Figured it out. The default redirect URI configuration in the tutorial app is incorrect, and does not work.

 

By default it whitelists https://{numbers}.ngrok.io/auth/shopify/callback which is actually incorrect - it should be https://{numbers}.ngrok.io/auth/callback 

 

Manually changing this in the app setup page in the partner dashboard fixes the issue. 

View solution in original post

Reply 1 (1)

jamesn92
Shopify Partner
2 1 0

This is an accepted solution.

Figured it out. The default redirect URI configuration in the tutorial app is incorrect, and does not work.

 

By default it whitelists https://{numbers}.ngrok.io/auth/shopify/callback which is actually incorrect - it should be https://{numbers}.ngrok.io/auth/callback 

 

Manually changing this in the app setup page in the partner dashboard fixes the issue.