NameIDentifier should use Id from context instead of username (#232)

This commit is contained in:
Wouter Van Speybroeck
2018-04-01 08:25:11 +02:00
committed by Tommy Parnell
parent c74cd15808
commit f60e8b5ffa

View File

@@ -105,7 +105,7 @@ namespace Owin.Security.Providers.Discord
};
if (!string.IsNullOrEmpty(context.Id))
{
context.Identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, context.UserName, XmlSchemaString, Options.AuthenticationType));
context.Identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, context.Id, XmlSchemaString, Options.AuthenticationType));
}
if (!string.IsNullOrEmpty(context.UserName))
{