These are my API routes:
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
Route::post('login', 'Auth\LoginController@login');
Route::group(['middleware' => 'auth:api'], function () {
Route::get('logout', 'Auth\LoginController@logout');
Route::get('posts', 'PostsController@index');
});
I installed Laravel Angular and Tymon JWT according to your docs, but when I try to call login method through the Postman on http://localhost:8000/api/login, I get Session store not set on request error. The only thing I added to these components is Barryvdh CORS component.
It looks like Laravel is expecting some kind of CSRF token, but I cannot give it one. I'm not sure about this, anyway.
These are my API routes:
I installed
Laravel AngularandTymon JWTaccording to your docs, but when I try to call login method through the Postman onhttp://localhost:8000/api/login, I getSession store not set on request error. The only thing I added to these components isBarryvdh CORScomponent.It looks like Laravel is expecting some kind of CSRF token, but I cannot give it one. I'm not sure about this, anyway.