Ответ 1
В предстоящей версии 2.0 Identity есть поддержка блокировки учетной записи
Конфигурация:
manager.UserLockoutEnabledByDefault = true; // Enables ability to lockout for users when created
manager.DefaultAccountLockoutTimeSpan = TimeSpan.FromMinutes(5);
manager.MaxFailedAccessAttemptsBeforeLockout = 5;
Использование:
manager.IsLockedOutAsync(user.Id) // Check for lockout
manager.ResetAccessFailedCountAsync(user.Id); // Clear failed count after success
manager.AccessFailedAsync(user.Id); // Record a failure (this will lockout if enabled)
manager.SetLockoutEnabled(user.Id, enabled) // Enables or disables lockout for a user