The specified 'redirect_uri' is not valid for this client application

I’m running into this issues, and I’ve read numerous posts for a solution, but haven’t found any yet.
I’m running an Umbraco v16.3.3

Currently I have these settings in appsettings.json

"Umbraco": {
"CMS": {
"WebRouting": {
"UmbracoApplicationUrl": "http://pumtum.dk/"
},
"Security": {
"BackOfficeHost": "http://pumtum.dk"
}
}
}

According to what I've read and the documentation, that should be it.

What am I doing wrong ?

Hi @dammark

If you haven’t already I would checkout this post offering a potential solution where someone was having similar issues Navigating to umbraco throws "invalid request" error

I presume you may have a shared database between more than one enviroment or may have changed and/or updated the hostname?

Yeah, I’ve read that post, but it didn’t make me much wiser :slight_smile:

Locally I’m using SQLite, and LIVE I’m running MSSQL, so no shared database.

But I did in fact change the hostname after the installation.
The issue is that some of the most popular danish hosting providers (Simply / Curanet) doesn’t offer SSL on their temporary/preview domains.

So after the installation I went to /umbraco and got this error. Then I read a shitload of posts, and assigned the domain pumtum.dk, but that didn’t help at all.

And now I stuck here.

Should I have run the installation on the pumtum.dk domain ?
And what should I do in the future, if I can’t use the temporary domain, when a client already have a live website on the primary domain ?

I’m hosting just fine on Simply.com but I just set the Umbraco:CMS:WebRouting:UmbracoApplicationUrl to the final domain. This adds your URL to the allowed login URLs as well as any auto-discovered URLs. However, and this is a very important point, Umbraco’s OpenID must have an exact match on the URL, so it could look like you forgot the s in https in your appsettings.

You could always set the temp URL in the WebApplicationUrl temporarily (and remember to restart the app pool) and you should be good to go. Also remember to set UseHttps to false.

I did the following to host on simply.com with a production domain already in place:

  1. Bind the domain: You are much better off going into their control panel and bind the real domain already from the beginning
  2. Activate SSL on the new domain: This is important, otherwise log in does not work.
  3. Create an appsettings.Production.json file and put the complete URI into the field (do not forget the S in HTTPS) and for good measure set UseHttps to true.
{
  "Umbraco": {
    "CMS": {
      "Global": {
        "UseHttps": true
      },
      "Hosting": {
        "Debug": false
      },
      "WebRouting": {
        "UmbracoApplicationUrl": "https://pumtum.dk"
      }
    }
  }
}
  1. Restart the app pool from the control panel: Otherwise the binding didn’t work on their IIS, I found at least and the new appsettings only gets picked up after a restart.

Hope this helps :slight_smile: