fix: normal logout affects all sessions (#3571)

Previously all user tokens were deleted, which logouts from all sessions.
This commit is contained in:
Robert Korulczyk 2023-02-21 17:23:20 +01:00 committed by GitHub
parent 33e2bd1a77
commit 79a9b23096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));