Skip to content

Session store not set on request when trying to login #20

Description

@micobarac

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions