Welcome Guest, Not a member yet? Register   Sign In
CSRF token expired when page is left open
#7

(01-17-2024, 09:44 AM)Valkhan Wrote: What I was trying to achieve is to instead of throwing an error (exception) I would handle the error by returning a 403 failed response and that would solve the issue of expired tokens bloatin my error monitor.

It would be nice to have an entry point to handle errors caught on filters, but I do not have knowledge if that feature exists.

You can create your own CSRF filter based on the framework CSRF filter:
https://github.com/codeigniter4/CodeIgni...hp#L55-L63
and see https://www.codeigniter.com/user_guide/i...g-a-filter
Reply


Messages In This Thread
RE: CSRF token expired when page is left open - by kenjis - 01-17-2024, 09:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB