GetUserId_reads_NameIdentifier_when_sub_was_mapped
This commit is contained in:
parent
44b391d496
commit
0d3fbf22c3
5 changed files with 290 additions and 1 deletions
|
|
@ -32,7 +32,9 @@ namespace Yavsc.Server.Helpers
|
|||
|
||||
public static string GetUserId(this ClaimsPrincipal user)
|
||||
{
|
||||
return user.FindFirstValue("sub");
|
||||
return user.FindFirstValue("sub")
|
||||
?? user.FindFirstValue(ClaimTypes.NameIdentifier)
|
||||
?? user.FindFirstValue("nameid");
|
||||
}
|
||||
|
||||
public static string GetUserName(this ClaimsPrincipal user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue