var claimsIdentity = this.User.Identity as ClaimsIdentity; var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
string userId = User.FindFirst(ClaimTypes.NameIdentifier)?.Value;
参考:https://www.it1352.com/2599186.html
标签:core,jwt,FindFirst,token,User,var,net,userId From: https://www.cnblogs.com/microsoft-zh/p/16985231.html