diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php index a6c8a131cee33..795b9b56a9e1a 100644 --- a/core/Middleware/TwoFactorMiddleware.php +++ b/core/Middleware/TwoFactorMiddleware.php @@ -110,7 +110,7 @@ public function beforeController($controller, $methodName) { && $this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) { $providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser()); - if ($providers->getProviders() === [] && !$providers->isProviderMissing()) { + if ($providers->getPrimaryProviders() === [] && !$providers->isProviderMissing()) { return; } }