Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am using Identity Server 4 to secure MVC App and Angular App, but when I try to sign in using Win Forms I receive the error: Un_Authrized client.

var tokenResponse = await httpClient.RequestClientCredentialsTokenAsync(new ClientCredentialsTokenRequest
{
    Address = "https://identityServerUrl/connect/token",
    ClientId = "clientId",
    ClientSecret = "seeecrit"
    Scope = "address email"
});

if (tokenResponse.IsError)
{
    MessageBox.Show($"Error: {tokenResponse.Error}");
    return;
}


What I have tried:

I tried ChatGpt, Google, and Identity Server 4 documentation
Posted
Updated 19-Feb-24 2:34am
v2
Comments
[no name] 19-Feb-24 17:04pm    
("authrized" (sic) is spelled wrong; whatever that means). And we have no way of verifying your credentials. And ... "This project is not maintained anymore. This repo will be archived when .NET Core 3.1 end of support is reached (13th Dec 2022). All new development is happening in the new Duende Software organization."
GabrieleTronchin 4 days ago    
Agree with the previous comment. Additionally, this code isn't sufficient to assist you. Could you please share more information with us?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900