sfelix-martins / passport-multiauth

Add support to multi-authentication to Laravel Passport
MIT License
288 stars 51 forks source link

problem when token is revoked or not valid Action #107

Closed Mirosine closed 4 years ago

Mirosine commented 5 years ago

Hi it works for me properly but when the token is incorrct or revoked the response is the laravel native login page I want to change that and make a json response .

I'm using middlewares like this : Route::group(['middleware' => ['api', 'multiauth:customer']], function () { ... Route::group(['middleware' => ['api', 'multiauth:admin']], function () { ... already thanks for any help !

sfelix-martins commented 4 years ago

Hi @Mirosine , Thanks!

Just pass the header Accept with value application/json in your request headers.

I hope it helps.