I think that at this point I'm able to tell you the author name and accurate posting date for this question elsewhere online if you give me a piece of the error description related to Laravel's Page Expired 419 on mobile phones. So yeah, that's what this question is about too. How do I solve it?
- I found users are experiencing friction with the login page of my app while using mobile phones. Oftentimes it gives an error 419, page expired. Needless to say the csrf token is there. It also works like a charm on desktop.
- I stumbled upon an older bug in the SameSite lax implementation, and also found good reasons not to alter this (e.g.
none
has a default fallback tostrict
, andlax
would be the best option from a security perspective). So I kept it that way, also thinking as the bug was admitted years ago there must be something else going on. - I've been clearing cache, routes, and config upon each change I made. This may help, but hasn't solved the problem yet.
- I first used the
file
session driver, and checked permissions - those were in order but still the 419 happens. - I've switched from
file
session driver to thedatabase
driver, ran the migration and seeing sessions populating the database. However, the issue still persists.
I feel it's something on the client side, or something in the config that gets activated when submitting the request, but I don't know where to look for anymore. If you've faced this issue before your insights are much appreciated. I'm using Laravel 8.75
for this project. I'll happily provide a bounty when possible to get this issue solved. Thanks.