Skip to content

Commit

Permalink
Fix 2FA authentication for firewalls other than admin (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvesh3 committed Nov 10, 2023
1 parent e5d25b7 commit e412b05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Security/PimcoreUserTwoFactorCondition.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ class PimcoreUserTwoFactorCondition implements TwoFactorConditionInterface
{
public function shouldPerformTwoFactorAuthentication(AuthenticationContextInterface $context): bool
{
//return true for performing two factor for firewalls other than admin
if ($context->getFirewallName() !== 'pimcore_admin') {
return false;
return true;
}

$user = $context->getUser();
Expand Down

0 comments on commit e412b05

Please sign in to comment.