Skip to content

Commit 3fba1cb

Browse files
committed
Replace SignInManager and update app version
Replaced the default SignInManager with a custom AuditSignInManager in `DependencyInjection.cs` to enable auditing functionality. Removed the `services.Configure<IdentityOptions>` block, which previously configured identity options. Updated the `Version` field in `appsettings.json` from `1.3.21` to `1.3.26` to reflect the new application version.
1 parent bf256eb commit 3fba1cb

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/Infrastructure/DependencyInjection.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,14 @@ private static IServiceCollection AddIdentityAndSecurity(this IServiceCollection
215215
.AddDefaultTokenProviders();
216216

217217

218+
// Replace the default SignInManager with AuditSignInManager
219+
var signInManagerDescriptor = services.FirstOrDefault(d => d.ServiceType == typeof(SignInManager<ApplicationUser>));
220+
if (signInManagerDescriptor != null)
221+
{
222+
services.Remove(signInManagerDescriptor);
223+
}
224+
services.AddScoped<SignInManager<ApplicationUser>, AuditSignInManager<ApplicationUser>>();
218225

219-
220226
services.Configure<IdentityOptions>(options =>
221227
{
222228
var identitySettings = configuration.GetRequiredSection(IDENTITY_SETTINGS_KEY).Get<IdentitySettings>();

src/Server.UI/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"AppConfigurationSettings": {
2929
"ApplicationUrl": "https://architecture.blazorserver.com",
30-
"Version": "1.3.21",
30+
"Version": "1.3.26",
3131
"App": "Blazor",
3232
"AppName": "Blazor Studio",
3333
"Company": "Company",

0 commit comments

Comments
 (0)