I want in my API response when token expired it will return message “token expired” with status code 419, and when token invalid return “Unauthenticated” with status 401.
How can I do that?
I only use the basic of usage laravel sanctum, and I expect I can custom the response of Laravel sanctum when it expired token different with invalid token.
New contributor