Laravel

Laravel Passport Logout

Deep
Written by Deep

Yet Passport in laravel provides the facility to logout itself, still sometimes you may face that you have logged out fromAuth::logout() , but your token is still alive. You need to revoke this token in your logout method.

Routes configuration:

My logout route:

Controller Configuration:

In AuthController.php use following classes / namespaces:

Now the logout method in above controller:

Using above method the current token’s status will be revoked and it will be not further usable.

 

1 Comment

Leave a Comment