Fix backwards compatibility

This commit is contained in:
Matej Bačo committed 2026-07-08 14:50:23 +02:00
1 parent b16119633b
commit 002cdf966c
1 file changed
+3 -1
+3 -1
View File
@@ -312,7 +312,9 @@ class Oidc extends OAuth2
protected function getUserinfoEndpoint(): string
{
$secret = $this->getAppSecret();
$endpoint = $secret['userInfoEndpoint'] ?? '';
// Read the legacy lowercase `userinfoEndpoint` key as a fallback so that
// OIDC configs stored via the old generic oauth2 PATCH endpoint keep working.
$endpoint = $secret['userInfoEndpoint'] ?? $secret['userinfoEndpoint'] ?? '';
if (!empty($endpoint)) {
return $endpoint;
}