Unable to get it working. introduced ConfigureDataProtectionTokenProviderOptions, no DB Configured at time of execution...

This commit is contained in:
2025-12-04 11:45:58 +01:00
parent afc9ba81e3
commit 0b541373c2
6 changed files with 56 additions and 53 deletions

View File

@@ -31,13 +31,9 @@ namespace SZUAbsolventenverein.Module.AdminModules.Startup
services.AddTransient<IAdminModulesService, ServerAdminModulesService>();
services.AddTransient<IAdminSettingsService, ServerAdminSettingsService>();
services.AddDbContextFactory<AdminModulesContext>(opt => { }, ServiceLifetime.Transient);
services.Configure<DataProtectionTokenProviderOptions>(options =>
{
options.TokenLifespan = TimeSpan.FromHours(2);
});
services.AddTransient<IConfigureOptions<DataProtectionTokenProviderOptions>, DataProtectionTokenOptionsConfigurator>();
services.AddTransient<IConfigureOptions<DataProtectionTokenProviderOptions>,
ConfigureDataProtectionTokenProviderOptions>();
}
}
}