diff --git a/SeaHavenIndustries/Data/Services/AccountService.cs b/SeaHavenIndustries/Data/Services/AccountService.cs index ad80d51..971b0e6 100644 --- a/SeaHavenIndustries/Data/Services/AccountService.cs +++ b/SeaHavenIndustries/Data/Services/AccountService.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.WebUtilities; using Microsoft.EntityFrameworkCore; using OfficeOpenXml; +using PasswordGenerator; using SeaHavenIndustries.Data.IRepository; using SeaHavenIndustries.Helper; using SeaHavenIndustries.Helper.ViewModels; @@ -128,7 +129,12 @@ namespace SeaHavenIndustries.Data.Services model.UserName = model.Email; model.CreatedDate = DateTime.Now; model.UniqueName = "Active"; - var password = GenerateRandomPassword(8); + + var pwd = new Password(8).IncludeLowercase().IncludeUppercase().IncludeSpecial().IncludeNumeric(); + var password = pwd.Next(); + + + //var password = GenerateRandomPassword(8); var result = await _userManager.CreateAsync(model, password); if (result.Succeeded) { diff --git a/SeaHavenIndustries/SeaHavenIndustries.csproj b/SeaHavenIndustries/SeaHavenIndustries.csproj index e27efc6..11de19e 100644 --- a/SeaHavenIndustries/SeaHavenIndustries.csproj +++ b/SeaHavenIndustries/SeaHavenIndustries.csproj @@ -15,6 +15,7 @@ +