
문제 Middleware('auth:api')로 들어가있는 route들에 대해, Middleware에서 걸러졌을 때에 Exception처리를 해야한다. /* routes/api.php */ Route::middleware('auth:api')->group(function(){ /* Routes.. */ }); (현재 auth처리는 laravel passport를 통해 하고 있다.) 해결 Middleware/Authenticate.php 수정 Authenticate.php에는 예외처리가 되었을 때, 어디로 redirect되어야 할지 정의하고 있다. 기존에는 return route('login')으로 되어있어서 미들웨어에서 걸러졌을 때, 자꾸 login route를 찾았던 것이다. 그래서 아래와 같이 rou..