1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 08:32:50 -05:00

[PM-18175] Remove flag check for 2FA recovery code login (#5513)

* Remove server-side flagging

* Linting

* Linting.
This commit is contained in:
Todd Martin
2025-03-17 16:20:51 -04:00
committed by GitHub
parent abfdf6f5cb
commit d3f8a99fa6
2 changed files with 3 additions and 10 deletions

View File

@ -1,5 +1,4 @@
using System.Text.Json;
using Bit.Core;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.Auth.Enums;
using Bit.Core.Auth.Identity.TokenProviders;
@ -155,12 +154,9 @@ public class TwoFactorAuthenticationValidator(
return false;
}
if (_featureService.IsEnabled(FeatureFlagKeys.RecoveryCodeLogin))
if (type is TwoFactorProviderType.RecoveryCode)
{
if (type is TwoFactorProviderType.RecoveryCode)
{
return await _userService.RecoverTwoFactorAsync(user, token);
}
return await _userService.RecoverTwoFactorAsync(user, token);
}
// These cases we want to always return false, U2f is deprecated and OrganizationDuo