diff --git a/SpeakingInBitsWeb/Models/IdentityConfiguration.cs b/SpeakingInBitsWeb/Models/IdentityConfiguration.cs
new file mode 100644
index 0000000..9814ccd
--- /dev/null
+++ b/SpeakingInBitsWeb/Models/IdentityConfiguration.cs
@@ -0,0 +1,40 @@
+using Microsoft.AspNetCore.Identity;
+
+namespace SpeakingInBitsWeb.Models
+{
+ ///
+ /// Provides configuration methods for ASP.NET Core Identity options.
+ ///
+ public static class IdentityConfiguration
+ {
+ ///
+ /// Configures the Identity options for the application.
+ ///
+ /// The IdentityOptions to configure.
+ public static void ConfigureIdentityOptions(IdentityOptions options)
+ {
+ // Password settings
+ options.Password.RequireDigit = false;
+ options.Password.RequireLowercase = false;
+ options.Password.RequireNonAlphanumeric = false;
+ options.Password.RequireUppercase = false;
+ options.Password.RequiredLength = 8;
+ options.Password.RequiredUniqueChars = 3;
+
+ // Lockout settings
+ options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes(5);
+ options.Lockout.MaxFailedAccessAttempts = 5;
+ options.Lockout.AllowedForNewUsers = true;
+
+ // User settings
+ options.User.AllowedUserNameCharacters =
+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._@+";
+ options.User.RequireUniqueEmail = false;
+
+ // Sign in settings
+ options.SignIn.RequireConfirmedAccount = false;
+ options.SignIn.RequireConfirmedEmail = false;
+ options.SignIn.RequireConfirmedPhoneNumber = false;
+ }
+ }
+}
diff --git a/SpeakingInBitsWeb/Program.cs b/SpeakingInBitsWeb/Program.cs
index 76d988c..5093feb 100644
--- a/SpeakingInBitsWeb/Program.cs
+++ b/SpeakingInBitsWeb/Program.cs
@@ -11,7 +11,7 @@
options.UseSqlServer(connectionString));
builder.Services.AddDatabaseDeveloperPageExceptionFilter();
-builder.Services.AddDefaultIdentity(options => options.SignIn.RequireConfirmedAccount = true)
+builder.Services.AddDefaultIdentity(IdentityConfiguration.ConfigureIdentityOptions)
.AddRoles() // Add role support to Identity
.AddEntityFrameworkStores();
builder.Services.AddControllersWithViews();