Base solution for your next web application
Open Closed

Bulk generate securitystamp for AbpUsers table #12130


User avatar
0
dominici created

Dear support, I'm migrating an old project made using one of the first version of Abp Zero to the last one.

I'm not able to find in the code how the SecurityStamp is calculated and I need to generate a script in order to bulk update an old Abp database.

By Microsoft documentation it seems that the SecurityStamp is a GUID but, looking some values, I found something like this:

OXIPKPYZNK6A6FFF4WZBZG4FJCAX5ENE ZQEWXERQRJXIQEUIF62LPNCQAWOHNYPT

Could you help me sharing the code or providing me a method to bulk calculate it for the entire AbpUsers table?

Thanks in advance

Br, Fabrizio


2 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi

    You can update the SecurityStamp value of the data in the AbpUsers table with the UpdateSecurityStampAsync() method that comes with the UserManager class in the Microsoft.Extensions.Identity.Core package.

  • User Avatar
    0
    dominici created

    Hi, thanks for suggestions, I've updated all the data using a simple code snippet .

    Br, Fabrizio