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

eaglehdr's avatar

Add redirection to 419 Page expired

First of all , I have seen many questions asked about 419 error appearing in React, or in general in different scenario, I am not here for those scenarios. I have another issue raised by the client himself. Sometimes the client opens the login page, writes email and password and then leave it there for a long time. after that time he clicks Login button which then redirects to same page but with error 419 Page Expired. We will all agree that error should appear, but he says you should refresh the Login page and then show same error above login box.

i am unable to do that, I even tried to create a middleware but VerifyCsrfToken is already there so my middleware does nothing.

For now I have set session expire time to 60 minutes , but for curiosity, Is it possible to do what my client is asking?

0 likes
0 replies

Please or to participate in this conversation.