Skip to content
This repository was archived by the owner on Dec 20, 2018. It is now read-only.
This repository was archived by the owner on Dec 20, 2018. It is now read-only.

Consider having the UserValidator ensure that SecurityStamp != null #1016

@shima20

Description

@shima20

When I called var principal = await _signInManager.CreateUserPrincipalAsync(user); , I was receiving an ArgumentNullException and had no idea what the issue was. Kevin from Openiddict told me to register UserClaimsPrincipalFactory to step in and see what field was null. This led me to find that my SecurityStamp was null and therefore caused the exception. Is this a bug?

if (UserManager.SupportsUserSecurityStamp)
            {
                id.AddClaim(new Claim(Options.ClaimsIdentity.SecurityStampClaimType,
                    await UserManager.GetSecurityStampAsync(user)));
            }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions