You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Various places in the SignInManager compare the userId against null. This is a problem for value types, for example Guid. I cannot use Guid? in my TUser as it needs to implement IEquatable<TKey>.
Various places in the
SignInManager
compare theuserId
againstnull
. This is a problem for value types, for exampleGuid
. I cannot useGuid?
in myTUser
as it needs to implementIEquatable<TKey>
.This returns
Guid.Empty
ifid == null
. HoweverGuid.Empty != null
and various places now assume a valid user. I see two possible fixes for this:TKey
to be a reference type:null
checks can remain as-is.null
checks withdefault
checks:Guid.Empty == default
.Some places where using a value type is a problem:
AspNetIdentity/src/Microsoft.AspNet.Identity.Owin/SignInManager.cs
Line 125 in b782674
AspNetIdentity/src/Microsoft.AspNet.Identity.Owin/SignInManager.cs
Line 170 in b782674
AspNetIdentity/src/Microsoft.AspNet.Identity.Owin/SignInManager.cs
Line 156 in b782674
The text was updated successfully, but these errors were encountered: