A resent discussion on similar is here: https://laracasts.com/discuss/channels/laravel/missing-session-data
Just suggestion to look over that post.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
The app that I'm currently working on has a section where an authenticated user can buy certain products. The payment is handled by a payment processor.
After the user submits the credit card details, the payment processor performs a POST request to my app to notify about the transaction status. The user gets redirected to a success or transaction failed page according to the status.
The problem is that after the third-party POST request the current session is lost and when I'm redirecting to one of those two pages the user is not authenticated anymore.
After doing some research I learned that a quick fix would be to set 'same_site' => null in session.php. Tried that and it works, but I'm fearing that I'm opening the door to some security issues (CSRF).
Is there a better way to do this? And by better I mean more secure.
Thanks.
Please or to participate in this conversation.