Search code examples
sql-serverasp.net-identity

Table structure in Asp.Net Identity


I have understood the Asp.Net Identity system it created 6 tables by default but didn't understood the use of Securitystamp column in AspNetUsers, what is the pupose of this column and why is it in GUID form.

Googled the same but didn't understood the actual purpose.


Solution

  • From the documentation

    IdentityUser.SecurityStamp Property

    A random value that should change whenever a users credentials have changed (password changed, login removed)

    So this value is used as a part of the value that generates the encrypted authentication cookie. If this changes the users authenticated ticket(s)/cookies will be rejected with the next request. It ensures that things like password changes or user name changes can force a user to re-authenticate with the next request.