Skip to content

Commit

Permalink
refactor:GetProfileDataAsync Claim padding adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh425 committed Mar 12, 2024
1 parent 059fa1e commit 4056654
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public async Task GetProfileDataAsync(ProfileDataRequestContext context)
var claimValues = await _authClient.UserService.GetClaimValuesAsync(userId);
foreach (var claimValue in claimValues)
{
context.IssuedClaims.TryAdd(new Claim(claimValue.Key, claimValue.Value));
if (!context.IssuedClaims.Any(x=>x.Type == claimValue.Key))
{
context.IssuedClaims.TryAdd(new Claim(claimValue.Key, claimValue.Value));
}
}
}
}
Expand Down

0 comments on commit 4056654

Please sign in to comment.