Check if there is a provider missing. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>tags/v23.0.0beta1
@@ -100,7 +100,11 @@ class TwoFactorMiddleware extends Middleware { | |||
if ($controller instanceof ALoginSetupController | |||
&& $this->userSession->getUser() !== null | |||
&& $this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) { | |||
return; | |||
$providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser()); | |||
if ($providers->getProviders() === [] && !$providers->isProviderMissing()) { | |||
return; | |||
} | |||
} | |||
if ($controller instanceof LoginController && $methodName === 'logout') { |