IdentityServer4
IdentityServer4 copied to clipboard
UserClaim is added twice to auth cookie
We can only help you if you are on the latest version.
Using NuGet package version 4.1.2.
Issue / Steps to reproduce the problem
INSERT INTO UserClaims (UserId, ClaimType, ClaimValue)
SELECT Id, 'turnips', 'lots'
FROM Users u
WHERE NOT EXISTS (
SELECT NULL FROM UserClaims z WHERE z.UserId = u.Id AND z.ClaimType = 'turnips'
)
Now log in and go to https://localhost:5001/diagnostics; the turnips claim appears twice in the list of claims in the authentication cookie.