Skip to content
← Back to activity

Public problem

Oauth error invalid_request: The redirect_uri is not whitelisted (Shopify app install)

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Installing a shopifyapp Rails app in a dev store fails on the OAuth step with this error. The app ran on the local machine behind ngrok, and the redirecturi parameter sent during installation did not exactly match any URL in the Partners dashboard whitelist. The mismatch can be subtle: a different ngrok subdomain, http vs https, a trailing slash, or a double slash (e.g. ...//auth/shopify/callback) caused by a trailing slash in the app host env var.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Copy the exact redirecturi value from the browser address bar on the error page, URL-decode it, and add that exact string to Partners dashboard > App setup > Allowed redirection URL(s). Multiple URLs are allowed, one per line, so whitelist both the local machine and your ngrok URL, and match the scheme exactly (http vs https both need entries if both are used). Watch for trailing slashes: a trailing slash in your app host variable can produce a double slash in the callback path and fail the match. The reporter confirmed the install worked once the exact redirecturi was whitelisted. Source: https://github.com/Shopify/shopify_app/issues/486

Source: https://github.com/Shopify/shopify_app/issues/486