Browse Source

Fix setting up 2FA providers when 2FA is enforced and bc are generated

When a user has backup codes generated and got their 2FA enforced then
they should be able to set up TOTP and similar providers during the
login.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
tags/v23.0.0beta1
Christoph Wurst 2 years ago
parent
commit
2fca843cc0
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      core/Middleware/TwoFactorMiddleware.php

+ 1
- 1
core/Middleware/TwoFactorMiddleware.php View File

@@ -92,7 +92,7 @@ class TwoFactorMiddleware extends Middleware {
&& !$this->reflector->hasAnnotation('TwoFactorSetUpDoneRequired')) {
$providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser());

if (!($providers->getProviders() === [] && !$providers->isProviderMissing())) {
if (!($providers->getPrimaryProviders() === [] && !$providers->isProviderMissing())) {
throw new TwoFactorAuthRequiredException();
}
}

Loading…
Cancel
Save