Using ASP.NET netcore example getting White list to redirect error

When using the Okta ASP.NET SDK, why do I get a White list to redirect error upon when the documentation states to configure it to the following login URI .


I have set the trusted origins, I have set the application to redirect the URL to the callback URL.
Yet it does not work, but in other languages like Golang it works perfectly!

Is the ASP NET library broken?

Gathering by the number of unanswered issues in your forum, on the same issue, this looks to be quite a common issue. Yet there are really no solutions posted why is that?


Have you added this callback url to the “Login redirect URIs” list for your application within Okta? It sounds like you’re running into this error: "The redirect_uri parameter must be an absolute URI that is whitelisted in the client app settings"

Yes, this is the error I am getting.
I have gone over the docs multiple times looking for something that I may have done wrong but I am unable to find anything why this won’t work for the net core example.
In short, I have two Applications defined pointing to the one is developed in Golang and one is in net core. Go version works perfectly (pcke implementation), yet the net core version repeated gives me the white list error. To be honest I am at loss as to why this would be occurring and I am looking for where to look next in an attempt to solve this issue. Unfortunately, I need the net core implementation to slot into a development stack.
Any ideas would be grateful.

When you encounter the error, what is the redirect_uri you see being passed in the authorize request in the URL? This is the best way to determine what Okta is seeing as the redirect URI coming in:

which is the https://localhost:44314/authorization-code/callback

thanks for the quick response.

hmmm… And you’re definitely using the right client_id and Okta org? I’m seeing the same error you are with that url and per your screenshot it looks like you do have the right login redirect URI configured.

Sure have I have checked it so many times I think I am starting to go crazy looking for ideas as to why?

@Dave It might be easier for you to contact and open a support case to get help there. Someone can review your logs and configuration settings to be sure we’re not missing anything.

1 Like

@Dave Could you use http instead of https in the OKTA configuration, as it redirecting to a private URL.

Instead of: https://localhost:44314/authorization-code/callback
Add: http://localhost:44314/authorization-code/callback