mirror of
https://github.com/bitwarden/server
synced 2025-12-11 22:03:38 +00:00
[PM-19055] Add OTP Token Provider that is not dependent on the User entity (#6081)
* feat(pm-19055) : - Add generic OTP generator. This OTP generator is not linked to .NET Identity giving us flexibility. - Update `OtpTokenProvider` to accept configuration object to keep interface clean. - Implement `OtpTokenProvider` in DI as open generic for flexibility. * test: 100% test coverage for `OtpTokenProvider` * doc: Added readme for `OtpTokenProvider`
This commit is contained in:
@@ -378,6 +378,8 @@ public static class ServiceCollectionExtensions
|
||||
public static IdentityBuilder AddCustomIdentityServices(
|
||||
this IServiceCollection services, GlobalSettings globalSettings)
|
||||
{
|
||||
services.TryAddTransient(typeof(IOtpTokenProvider<>), typeof(OtpTokenProvider<>));
|
||||
|
||||
services.AddScoped<IOrganizationDuoUniversalTokenProvider, OrganizationDuoUniversalTokenProvider>();
|
||||
services.Configure<PasswordHasherOptions>(options => options.IterationCount = 100000);
|
||||
services.Configure<TwoFactorRememberTokenProviderOptions>(options =>
|
||||
|
||||
Reference in New Issue
Block a user