diff --git a/framework/core/src/Forum/Controller/LogOutController.php b/framework/core/src/Forum/Controller/LogOutController.php index c2ef4800e9..f5eb88d30e 100644 --- a/framework/core/src/Forum/Controller/LogOutController.php +++ b/framework/core/src/Forum/Controller/LogOutController.php @@ -102,11 +102,12 @@ public function handle(Request $request): ResponseInterface 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));