❔ claim type for Id(Primery key) of a Model

what claim type i can user to store Id(Primery key) of a Model
3 Replies
Pendramon
Pendramon3y ago
If you are using JWT then the standard is storing user Id in the "sub" (Subject) claim. If you have a reference to System.IndentityModel.Token.Jwt you can use JwtRegisteredClaimNames.Sub for statically typed claim type. https://learn.microsoft.com/en-us/dotnet/api/system.identitymodel.tokens.jwt.jwtregisteredclaimnames.sub
Anton
Anton3y ago
also the claim type can be any string
Accord
Accord3y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?