Relative Content

Tag Archive for bearer-tokenlaravel-sanctumlaravel-11

Laravel 11 Sanctum Token Expiration

I’m developing an Api with Laravel 11 using Sanctum as the authentication method. I’ve set the token expiration to 7 days and I’d like the client to receive a 401 response ‘Token invalid or expired’ when the token expires. But this doesn’t work.Instead, the client (here Postman) receives a 200 response with html content similar to the following