public static YourApplicationUserManager Create(
            IdentityFactoryOptions <YourApplicationUserManager> options,
            IOwinContext context)
        {
            var manager = new YourApplicationUserManager(new YourApplicationUserStore(new YourApplicationUserRepository()));

            manager.UserValidator = new UserValidator <YourApplicationUser, int>(manager)
            {
                AllowOnlyAlphanumericUserNames = true,
                RequireUniqueEmail             = true
            };

            manager.PasswordValidator = new PasswordValidator
            {
                RequiredLength          = 1,
                RequireNonLetterOrDigit = false,
                RequireDigit            = false,
                RequireLowercase        = false,
                RequireUppercase        = false,
            };

            manager.UserLockoutEnabledByDefault = false;

            manager.DefaultAccountLockoutTimeSpan        = TimeSpan.FromMinutes(500000);
            manager.MaxFailedAccessAttemptsBeforeLockout = 500000;

            var dataProtectionProvider = options.DataProtectionProvider;

            if (dataProtectionProvider != null)
            {
                manager.UserTokenProvider =
                    new DataProtectorTokenProvider <YourApplicationUser, int>(dataProtectionProvider.Create("ASP.NET Identity"))
                {
                    TokenLifespan = TimeSpan.FromHours(48)
                };
            }

            // manager.EmailService = new EmailService();
            return(manager);
        }
 public YourApplicationSignInManager(YourApplicationUserManager userManager, IAuthenticationManager authenticationManager)
     : base(userManager, authenticationManager)
 {
 }