I dont know exactly what i am doing wrong but i noticed that all XHR Requests from the JS file towards the api (auth:sanctum protected routes) do get redirected to the front page with a 302. I suspect it has something to do with the CSRF logic, however every request that gets send out from JS has the token included.
Any idea why this is happening?