Skip to content

Commit 2fca843

Browse files
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>
1 parent 904a762 commit 2fca843

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/Middleware/TwoFactorMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function beforeController($controller, $methodName) {
9292
&& !$this->reflector->hasAnnotation('TwoFactorSetUpDoneRequired')) {
9393
$providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser());
9494

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

0 commit comments

Comments
 (0)