I am getting ready to switch to using IdentityServer and I am having an issue. I changed the ClientId and ClientSecrets in the Hosts appsettings.json. I then went to test it by using the ConsoleApiClient. I also changed the ClientId and ClientSecrets to match whats in the config file. But it now gives me the error. "Invalid_client".
Does anyone have any ideas? Is there another place I need to change the ClientId and secret?
I for sure can't keep them the defaults that comes when we download the project.
4 Answer(s)
-
0
Hi,
You also need to change it here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/master/aspnet-core/test/MyCompanyName.AbpZeroTemplate.ConsoleApiClient/Program.cs">https://github.com/aspnetzero/aspnet-ze ... Program.cs</a>.
-
0
@ismcagdas, oh yeah sorry that is what I meant when I said I also changed the ClientId and ClientSecrets to match what's in the config file. I meant that I changed it in the <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/master/aspnet-core/test/MyCompanyName.AbpZeroTemplate.ConsoleApiClient/Program.cs">https://github.com/aspnetzero/aspnet-ze ... Program.cs</a>. But I am still getting the "Invalid_Client"
-
0
I got the new client to work but I am having a different issue with the test project. When the method RunDemoAsync() runs and it tries to grab the GetUsersListAsync(accessToken) it throws a 500 error but doesn't give me any more details than that. I tried looking in the log for the error but nothing.
One more question. What is the tempkey.rsa used for?
-
0
wrap GetUsersListAsync in a try-catch block to see the error. Beside if you get error in GetUsersListAsync action, it's better to see web logs. Because web api doesn't send exception details.