MatthijsDJ
10 months ago

resulted in a `401 Unauthorized` response: Token validation failed: 'kid' is missing in the JWT token header.

Posted 10 months ago by MatthijsDJ

Hi,

I've installed Passport as per documentation, was able to create a personal access token and protect one of my test routes.

I can verify the working of both the protection and the route itself via Postman, however I made a test page to grab data from my api via Gruzzle.

I used the example in the documentation:

$response = $client->request('GET', '/api/post', [ 'headers' => [ 'Accept' => 'application/json', 'Authorization' => 'Bearer ' .$accesToken, ],

Where accesstoken is defined in a var just above the snippet.

For some reason this results in the following error: resulted in a 401 Unauthorized response: Token validation failed: 'kid' is missing in the JWT token header.

Any ideas?

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