Files
desktop/docs/Umsetzungsanweisung/Old-Nexus/partials/landingpages/auth/logout.php
Lars Gebhardt-Kusche 2cdd14c400
All checks were successful
Deploy / deploy-staging (push) Successful in 24s
Deploy / deploy-production (push) Has been skipped
deploy
2026-06-20 01:50:07 +02:00

24 lines
494 B
PHP

<?php
use App\OidcClient;
$config = app()->config();
$session = app()->session();
$session->start();
$idToken = null;
if (!empty($_SESSION['auth_user']['id_token'])) {
$idToken = (string)$_SESSION['auth_user']['id_token'];
}
unset($_SESSION['auth_user'], $_SESSION['auth_id_token'], $_SESSION['auth_expires_at']);
if ($config->authEnabled) {
$client = new OidcClient($config);
$url = $client->logoutUrl($idToken);
if ($url) {
redirect($url);
}
}
redirect('/');