]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/Oidc/OidcProviderSettings.php
Fixed OIDC JWT key parsing in microsoft environments
[bookstack] / app / Auth / Access / Oidc / OidcProviderSettings.php
index 32946d058cf807c51153c3ce9f2108ccd2c708d9..016d006d2c0af68d8751dcc5ef97b933c84dfa8a 100644 (file)
@@ -164,7 +164,8 @@ class OidcProviderSettings
     protected function filterKeys(array $keys): array
     {
         return array_filter($keys, function (array $key) {
-            return $key['kty'] === 'RSA' && $key['use'] === 'sig' && $key['alg'] === 'RS256';
+            $alg = $key['alg'] ?? null;
+            return $key['kty'] === 'RSA' && $key['use'] === 'sig' && (is_null($alg) || $alg === 'RS256');
         });
     }