I am using Identity 2.1 in my MVC5 app. I am setting the isPersistent property of the PasswordSignInAsync to true to enable \'Remember Me\':
var result = await S
There is an explanation for TimeSpan
parameter in similar question. Simply use the infinite cookies, like this:
OnValidateIdentity = SecurityStampValidator
.OnValidateIdentity(
validateInterval: TimeSpan.FromMinutes(0),
regenerateIdentity: (manager, user)
=> user.GenerateUserIdentityAsync(manager))
This is also needed for it to work correctly:
Call
await UserManager.UpdateSecurityStampAsync(userId);
before
AuthenticationManager.SignOut();