How to create a security stamp value for asp.net identity (IUserSecurityStampStore)

后端 未结 3 1515
死守一世寂寞
死守一世寂寞 2021-02-18 16:56

In my MVC-5 application, I have to create security stamp values manually. The current implementation of the identity team seems to use a guid.

G         


        
3条回答
  •  灰色年华
    2021-02-18 17:35

    a bit late to the party, but these seem to work just fine:

            await _userManager.UpdateSecurityStampAsync(user);
            await _userManager.UpdateNormalizedEmailAsync(user);
            await _userManager.UpdateNormalizedUserNameAsync(user);
            await _userManager.SetLockoutEnabledAsync(user, true);
    

提交回复
热议问题