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
@@ -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(); | |||
} | |||
} |