1
I am making an authentication using cookies following the examples
Custom Authentication in ASP.Net-Core
Creating a simple login in ASP.NET Core 2 using Authentication and Authorization (NOT Identity)
I managed to do, already checking the data in the database, but I came up with a question, and I did not find the answer, as I do to get the user data logged in after authentication?
saw that in the code part below it stores some user data, so how do I take this data for example the user code to show only the records related to it?
identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, loginData.Username));
identity.AddClaim(new Claim(ClaimTypes.Name, loginData.Username));
For example on the user data editing page, you would need to take the values set in Claimtypes.Nameidentifier and Claimtypes.Name, how would you do that? or do I need to store this data in session?
Thank you!