justinbutler wrote a reply+100 XP
4d ago
Laravel 13 + Sanctum + Fortify: API Routes Redirecting
This can happen when Laravel is used as an API backend with Sanctum and Fortify. I would first check the middleware and make sure API requests use the right authentication guard. Like a Slope Game, small setup details can affect the whole experience, so the redirect may come from web middleware handling an unauthenticated API request.