diff --git a/src/lib/MVC/Symfony/Security/InteractiveLoginToken.php b/src/lib/MVC/Symfony/Security/InteractiveLoginToken.php index 2a5619e183..65167c3eda 100644 --- a/src/lib/MVC/Symfony/Security/InteractiveLoginToken.php +++ b/src/lib/MVC/Symfony/Security/InteractiveLoginToken.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\MVC\Symfony\Security; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; +use Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken; /** * This token is used when a user has been matched by a foreign user provider. @@ -41,6 +42,15 @@ public function __unserialize($serialized): void [$this->originalTokenType, $parentStr] = $serialized; parent::__unserialize($parentStr); } + + public function isAuthenticated(): bool + { + if (PostAuthenticationGuardToken::class === $this->originalTokenType) { + return true; + } + + return parent::isAuthenticated(); + } } class_alias(InteractiveLoginToken::class, 'eZ\Publish\Core\MVC\Symfony\Security\InteractiveLoginToken');