Click here to Skip to main content
15,614,943 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Where does user claim data stored in client computer ?
3)Local Storage
Please help.

I know token gets store in local storage, session Id gets stored in cookies, but where does claim data gets stored ?

What I have tried:

var claims = new[]
 new Claim(ClaimTypes.NameIdentifier, userFromRepo.Id.ToString()),
  new Claim(ClaimTypes.Name, userFromRepo.Username)

Here ,I have kept Username and Id in claim ,but where does it stored. I think it will store in cookies. I am right ? Help me
Updated 1-Apr-19 10:33am

Yes. It basically creates an encrypted cookie on the user's browser. The claims data will then be deleted once you remove the cookie or when the cookie expires.
Share this answer
[no name] 2-Apr-19 9:28am    
Where does this encrypted cookies located in browser ? Why it is encrypted ?
Vincent Maverick Durano 2-Apr-19 10:50am    
It's encrypted so it can't be tampered, hence it's secured. Cookies are stored in different locations depending on which browser you were in. See this short discussion here:
Depends on the environment the code is running under: storage for a web app will be very different from storage in a WinForms app (and will probably be spread across a couple of those in either)
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900