Skip to content

Commit 826f053

Browse files
committed
don’t try to get session when it’s stateless
1 parent 2f19c19 commit 826f053

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/EventListener/LoginListener.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ public function __construct(HubInterface $hub, ?TokenStorageInterface $tokenStor
4747
*/
4848
public function handleKernelRequestEvent(RequestEvent $event): void
4949
{
50-
if (null === $this->tokenStorage || !$this->isMainRequest($event)) {
50+
if (
51+
null === $this->tokenStorage
52+
|| !$this->isMainRequest($event)
53+
|| $event->getRequest()->attributes->get('_stateless')
54+
) {
5155
return;
5256
}
5357

0 commit comments

Comments
 (0)