From 26fb4c68a6c2e45b89c73c6ca7c98f06e23abc60 Mon Sep 17 00:00:00 2001 From: Divesh Pahuja Date: Fri, 10 Nov 2023 09:44:30 +0100 Subject: [PATCH] Fix 2FA authentication for firewalls other than admin --- src/Security/PimcoreUserTwoFactorCondition.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Security/PimcoreUserTwoFactorCondition.php b/src/Security/PimcoreUserTwoFactorCondition.php index c74cac25de..81ea7a3cac 100644 --- a/src/Security/PimcoreUserTwoFactorCondition.php +++ b/src/Security/PimcoreUserTwoFactorCondition.php @@ -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();