Reputation: 5085
I am using Identity Server 4 for authentication. I have MVC client. Few days ago i was able to authenticate successfully. But recently i made some changes in Identity Server project which broke something. I am getting
unauthorized_client The client application is not known or is not authorized.
I tried all the possible fixes but couldn't fix it. Is there any way i can debug the code. I could see that the call was made to /connect/authorize
endpoint and calls are going to IScopeStore.FindScopesAsync
and IClientStore.FindClientByIdAsync
and i verified it has all proper AllowedScopes
.
Can anyone tell me how do i troubleshoot these kind of issues with Identity Server 4. Also, i am interested to know the execution flow. What IDSvr endpoints are called and when?
Upvotes: 11
Views: 19425
Reputation: 342
Your client_id and (Client config) sent in the /connect/authorize request must match exactly ClientId configured on IdentityServer4. To debug, use the output window to read the log messages or log the a file.
Upvotes: 0
Reputation: 5010
your problem can be anything. enable logging to the console and you can find out what it is. Identity Server 4 by default uses the asp.net core logger provider to do its internal logging.
in your Startup.cs
within the Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
method. Add Console logging by loggerFactory.AddConsole(LogLevel.Trace);
and make sure that you include the logger extension package in your project.json "Microsoft.Extensions.Logging.Console": "1.0.0",
.
Upvotes: 8