11 months ago

Still Unauthorized using CreateFreshApiToken middleware

Posted 11 months ago by ouhare

Using Laravel 5.7 with Laravel Passport 7.0.5 and CreateFreshApiToken middleware and using vuejs & axios with default javascript scaffold (header X-CSRF-TOKEN and X-Requested-With).

My users are logged using session driver (Auth::attempt). I got the laravel_token attached on outgoing responses.

When I use axios to call '/api/user', the laravel_token cookie is correctly send (with laravel_session and XSRF-TOKEN) but I still have a 401 - Unauthorized response...

Do I do something wrong ?

Please sign in or create an account to participate in this conversation.