Ok just found the solution.
The session driver was set to database instead of cookie.
But what's amazing is that I didn't change it.
So yesterday it worked, today it doesn't work with database as session driver.
Hello,
I try once again to use InertiaJS and once again I have problems with authentication.
Yesterday it worked fine, today it doesn't work.
I have a custom redirection after authentication (already worked with).
When I log in, the network tools show that the user is redirected to the dashboard page (great), but immediately back to the login page.
If I replace manually the route in the browser, for example to load the dashboard, I am redirected to the login page.
The dashboard route is protected with the auth middleware. Without the middleware, sure I can access the dashboard.
I share the authenticated user with the front (VueJS), the user is set to null.
So I think that the authentication worked, but immediately the application loses the authentication.
Furthermore I regularly have CSRF token mismatch (error 419).
Why ?
Do you have any idea what I could check ?
Thanks for your help.
V
Ok just found the solution.
The session driver was set to database instead of cookie.
But what's amazing is that I didn't change it.
So yesterday it worked, today it doesn't work with database as session driver.
Please or to participate in this conversation.