You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
415 B

<?php
require('_common.php');
use authkit2\Authkit2;
// Initialize the three-legged oauth flow
$flow = new \authkit2\Oidc\Flows\UserFlow(Authkit2::get_client());
// Log the user out locally
unset($_SESSION['access_token']);
unset($_SESSION['refresh_token']);
// Redirect them to the openid provider to log them out
$redirect_url = $flow->getLogoutUrl(OPENID_REDIRECT_URL);
header('Location: '.$redirect_url);