Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Blacklist or logout JWT token in laravel 5.4 #1725

Open
shahid-hussain009 opened this issue Dec 14, 2018 · 2 comments
Open

How to Blacklist or logout JWT token in laravel 5.4 #1725

shahid-hussain009 opened this issue Dec 14, 2018 · 2 comments
Labels

Comments

@shahid-hussain009
Copy link

Token Black list

i use this but not work in laravel 5.4 everything is working except logout

public function logout(Request $request) 
    {
        config([
            'jwt.blacklist_enabled' => true
        ]);
        \Cookie::forget('token');
        auth()->logout();
        JWTAuth::invalidate(JWTAuth::parseToken());
        return response()->json(['message' => 'Successfully logged out']);
    }
@uzwebline
Copy link

Try to change CACHE_DRIVER=file in .env file, in array mode I also had trouble with logout

@stale
Copy link

stale bot commented Dec 26, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Dec 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants