Open tanshiqi opened 7 years ago
If you follow the tutorial for the new JWT guard, you will understand you don't need to do this. The application looks at the header of the request and responds with the appropriate resource. If it is a json request, it responds with a token, else it redirects you to the login page.
In my scene, I want user authentication from jwt token, if not valid then redirect to login page. How to do this? It doesn't work:
Route::group([ 'middleware' => ['jwt.auth', 'auth'] ], function () { ... });