Skip to content

Commit f60e8b5

Browse files
woutervsTerribleDev
authored andcommitted
NameIDentifier should use Id from context instead of username (#232)
1 parent c74cd15 commit f60e8b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Owin.Security.Providers.Discord/DiscordAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ protected override async Task<AuthenticationTicket> AuthenticateCoreAsync()
105105
};
106106
if (!string.IsNullOrEmpty(context.Id))
107107
{
108-
context.Identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, context.UserName, XmlSchemaString, Options.AuthenticationType));
108+
context.Identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, context.Id, XmlSchemaString, Options.AuthenticationType));
109109
}
110110
if (!string.IsNullOrEmpty(context.UserName))
111111
{

0 commit comments

Comments
 (0)