AspnetIdentitySample icon indicating copy to clipboard operation
AspnetIdentitySample copied to clipboard

ClaimesIdentityFactory broken when upgrade to AspNet.Identity.Core v2

Open OzBob opened this issue 11 years ago • 0 comments

hi Pranav

After doing an update of the all Nuget packages including to AspNet.Identity.Core v2 ...

In IdentityExtensions\MyClaimsIdentityFactory.cs Error: The type 'TUser' must be a reference type in order to use it as parameter 'TUser' in the generic type or method 'Microsoft.AspNet.Identity.ClaimsIdentityFactory<TUser>'

The fix is to change:

public class MyClaimsIdentityFactory<TUser> : ClaimsIdentityFactory<TUser> where TUser : IUser<string>

to

public class MyClaimsIdentityFactory<TUser> : ClaimsIdentityFactory<TUser> where TUser : class, IUser<string>

I'll learn how to do a Git Pull request and see if I can add it to the repo ....

regards Rob

OzBob avatar Apr 22 '14 07:04 OzBob