A
A
ag0332022-01-27 11:21:43
Laravel
ag033, 2022-01-27 11:21:43

How to return 403 response code on expired Laravel Passport token?

I am writing api for version 8 of Laravel. Passport was chosen for authorization. If the token is missing or incorrect, 401 server response code is returned as it should, but if the token is expired, 401 response code is also returned, which is incorrect and, in theory, should be 403 token. I searched all over the Internet and all the documentation, but did not find the answer to the question.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question