mirror of
https://github.com/flarum/framework.git
synced 2024-11-22 12:31:41 +08:00
fix: normal logout affects all sessions (#3571)
Previously all user tokens were deleted, which logouts from all sessions.
This commit is contained in:
parent
33e2bd1a77
commit
79a9b23096
|
@ -102,11 +102,12 @@ class LogOutController implements RequestHandlerInterface
|
|||
return new HtmlResponse($view->render());
|
||||
}
|
||||
|
||||
$accessToken = $session->get('access_token');
|
||||
$response = new RedirectResponse($url);
|
||||
|
||||
$this->authenticator->logOut($session);
|
||||
|
||||
$actor->accessTokens()->delete();
|
||||
$actor->accessTokens()->where('token', $accessToken)->delete();
|
||||
|
||||
$this->events->dispatch(new LoggedOut($actor, false));
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user