Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <[email protected]>
  • Loading branch information
ChristophWurst authored and backportbot[bot] committed Aug 25, 2021
commit c2d175a7106a9239bcdfc74879498b753b6ef449
2 changes: 1 addition & 1 deletion core/Middleware/TwoFactorMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function beforeController($controller, $methodName) {
&& !$this->reflector->hasAnnotation('TwoFactorSetUpDoneRequired')) {
$providers = $this->twoFactorManager->getProviderSet($this->userSession->getUser());

if (!($providers->getProviders() === [] && !$providers->isProviderMissing())) {
if (!($providers->getPrimaryProviders() === [] && !$providers->isProviderMissing())) {
throw new TwoFactorAuthRequiredException();
}
}
Expand Down