diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-07-30 19:29:23 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-08-25 15:39:11 +0300 |
commit | 0629b58382eaafda42524b1465463c4e8905c465 (patch) | |
tree | 84a25cf6bf1f80f0aed02a2c971f44c5c0ab9d40 | |
parent | 34b5d979ffa7734ce9735d814f581ef63f236525 (diff) |
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>
-rw-r--r-- | core/Middleware/TwoFactorMiddleware.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php index 330a9258d90..398234fa1e4 100644 --- a/core/Middleware/TwoFactorMiddleware.php +++ b/core/Middleware/TwoFactorMiddleware.php @@ -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(); } } |