Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

EmilMoe's avatar
Level 10

Session lost after login

My setup is that I am using a third party SAML2 login (Single Sign On). That activates a Listener Saml2Login whenever it gets redirected back that checks the credentials I'm given from the service.

Then I perform Auth::loginUsingId($user->id); according to the ID I got from the server.

Everything works so far in Chrome and Firefox, but Internet Explorer and Edge forgets the information about the signed on session to the next page, so the user is not signed on.

Any ideas how I can fix this issue?

It's App\Http\Middleware\Authenticate.php where it has forgotten the login after the listener.

0 likes
4 replies
EmilMoe's avatar
Level 10

I can't use CSRF token as I'm redirected back from a login service, but I created a middleware group with all the same middlewares as web except for the token.

Please or to participate in this conversation.