IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

UserClaim is added twice to auth cookie

Open rwb196884 opened this issue 4 years ago • 0 comments

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.

rwb196884 avatar Sep 15 '21 11:09 rwb196884