0👍
You are using the auth:api
middleware, this is by default a token based authentication but I don’t see you adding any Bearer
token header.
There are 2 possible solutions that I know.
- If you want to keep using the
auth:api
middleware, request an api token and use that in your requests (https://laravel.com/docs/6.x/api-authentication), but it would be better to switch to Laravel Passport - Personally I would use web auth for this (session based), after you login a session token will be added and you don’t really have to do much with it because it will be added to all calls after that
- [Vuejs]-Vue "npm run build" Ignores vue.config.js File
- [Vuejs]-Imperavi article editor token missmatch while uploading image
Source:stackexchange.com