I am using MVC5 with Owin identity.
I am struggling to reuse any custom Claims in regenerateIdentityCallback.
I have in Startup this configuration (as provided i
I gave up and created own SecurityStampValidator
which does exactly the same as original, but passes the current claimsIdentity to regenerateIdentityCallback as param. Not at all happy about this solution, but it works.
OnValidateIdentity = MySecurityStampValidator.OnValidateIdentity(
validateInterval: TimeSpan.FromSeconds(10),
regenerateIdentityCallback: (manager, user, previousIdentity) => user.GenerateUserIdentityAsync(manager, previousIdentity),
getUserIdCallback: user => Guid.Parse(user.GetUserId()))