diff --git a/lib/Controller/LoginController.php b/lib/Controller/LoginController.php index 95a1947c..54cfe362 100644 --- a/lib/Controller/LoginController.php +++ b/lib/Controller/LoginController.php @@ -724,13 +724,15 @@ public function backChannelLogout(string $providerIdentifier, string $logout_tok ); } - $sub = $logoutTokenPayload->sub; - if ($oidcSession->getSub() !== $sub) { - return $this->getBackchannelLogoutErrorResponse( - 'invalid SUB', - 'The sub does not match the one from the login ID token', - ['invalid_sub' => $sub] - ); + if (isset($logoutTokenPayload->sub)) { + $sub = $logoutTokenPayload->sub; + if ($oidcSession->getSub() !== $sub) { + return $this->getBackchannelLogoutErrorResponse( + 'invalid SUB', + 'The sub does not match the one from the login ID token', + ['invalid_sub' => $sub] + ); + } } $iss = $logoutTokenPayload->iss; if ($oidcSession->getIss() !== $iss) {