GODT-2180: Allow login with FIDO2

The API docs didn't specify what the "integer" meant. Turns out it's a
bitfield; we can't compare with equality.
This commit is contained in:
James Houlahan
2022-12-05 12:05:35 +01:00
parent 27889b8085
commit 990b8cda96
3 changed files with 3 additions and 3 deletions

View File

@ -406,7 +406,7 @@ func (s *Service) Login(ctx context.Context, login *LoginRequest) (*emptypb.Empt
s.auth = auth
switch {
case auth.TwoFA.Enabled == proton.TOTPEnabled:
case auth.TwoFA.Enabled&proton.TOTPEnabled != 0:
_ = s.SendEvent(NewLoginTfaRequestedEvent(login.Username))
case auth.PasswordMode == proton.TwoPasswordMode: