Skip to content

Commit

Permalink
fix: normal logout affects all sessions (#3571)
Browse files Browse the repository at this point in the history
Previously all user tokens were deleted, which logouts from all sessions.
  • Loading branch information
rob006 authored Feb 21, 2023
1 parent 33e2bd1 commit 79a9b23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion framework/core/src/Forum/Controller/LogOutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 79a9b23

Please sign in to comment.