Shopify custom app error: Oauth error invalid_request: The redirect_uri is not whitelisted

I’m developing a custom app for single store with having no issues, but since today I’ve starting getting the 400 error: Oauth error invalid_request: The redirect_uri is not whitelisted

I’ve double checked in the forums for this related error and double checked the whitelisted URLs but the problem is still persistent.

These are the credentials:

I was being able to start my local environment (“npm run dev”) until yesterday but not today.

Maybe is there something malformed in the URL? (it is automatically generated temporary by cloudflare) :

Generated via “npm run dev”:

https://fears-lying-apartment-willow.trycloudflare.com?shop=tentree-test-store.myshopify.com&host=dGVudHJlZS10ZXN0LXN0b3JlLm15c2hvcGlmeS5jb20vYWRtaW4

Generated via Partners > App > Overview > Test store :

https://tentree-test-store.myshopify.com/admin/oauth/authorize?client_id=292cb82a6579099b88d36d92b8d59223&scope=read_users&redirect_uri=https%3A%2F%2Ffears-lying-apartment-willow.trycloudflare.com%2Fapi%2Fauth%2Fcallback&state=905043b3-1f1a-435d-bcc5-6d46378c5048&grant_options%5B%5D=per-user

App name: “Tentree [Development]”

Development store: “tentree test store” (tentree-test-store.myshopify.com)

1 Like

Solved, it was because I have to clean the entries in the table "sessions" my local database when I install the App in my store. Somethimes the “APP_UNINSTALLED” event is not being triggered properly and doesn’t clean the sessions table entry.