Skip to content

Commit 874479d

Browse files
ChristophWurstbackportbot[bot]
authored andcommitted
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 c81fd49 commit 874479d

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
@@ -93,7 +93,7 @@ public function beforeController($controller, $methodName) {
9393
&& !$this->reflector->hasAnnotation('TwoFactorSetUpDoneRequired')) {
9494
$providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser());
9595

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

0 commit comments

Comments
 (0)