Files
Fitness/web/logout.php
T
2026-10-23 03:25:41 -07:00

15 lines
402 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
declare(strict_types=1);
require_once __DIR__ . '/config.php';
// Destroy the PHP session.
session_start();
session_destroy();
// Redirect the user to Authelia’s logout endpoint.
// Authelia will clean its session and then redirect back.
$logoutUrl = OIDC_LOGOUT_ENDPOINT
. '?post_logout_redirect_uri=' . urlencode(OIDC_POST_LOGOUT_REDIRECT_URI);
header('Location: ' . $logoutUrl);
exit;