The token could not be parsed from the request
The token could not be parsed from the request

The token could not be parsed from the request

For some magic reasons(simulating requests) phpunit can’t pass tests with JWT token header or GET param token=?.

Solution is just add few lines to middleware or anywhere else like this.

Got it work with this code in my middleware:

Result middleware for api auth

Result :)
Result 🙂