So my problem is that I installed Sanctum to my Laravel project and trying to use it on web routes in web.php. But when I logged in and trying to reach the location the site redirect me back to the main page and I don't know why this happens. The site should redirect me back when I'm not logged in.
Route::get('/support', function () {
return view('support');
})->middleware("auth:sanctum");
This is the code which I'm using in the web.php file. I think that the middleware somehow doesn't get the user loginToken which is created after the login, but I don't know where to fix it.