DEV Community

Discussion on: Setting up an Authorization Server with OpenIddict - Part III - Client Credentials Flow

Collapse
 
elmalah profile image
Tarek El-Mallah

Hi,
for client credential flow, code below not lead to include the claim in the access token

identity.AddClaim("some-claim", "some-value", OpenIddictConstants.Destinations.AccessToken);

The correct code is as below

identity.AddClaim(new Claim("some-claim2", "some-value2").SetDestinations(OpenIddictConstants.Destinations.AccessToken));


The first syntax not working (tested on OpenIddict V4 with dotnet 6.0)