Skip to content

Commit

Permalink
Merge pull request #28262 from nextcloud/fix/set-up-2fa-providers-enf…
Browse files Browse the repository at this point in the history
…orced-with-backup-codes

Fix setting up 2FA providers when 2FA is enforced and bc are generated
  • Loading branch information
kesselb authored Aug 25, 2021
2 parents 97ff0c9 + 2fca843 commit 98ad69f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/Middleware/TwoFactorMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,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

0 comments on commit 98ad69f

Please sign in to comment.