fix oidc authorities #7714
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Mar 26, 2026 at 16:10 UTC
b6257f213d8871f23b57a6ee2cdb2b2384ff6a89
1 file changed
+1
-1
webserver.js
+1
-1
@@ -8427,7 +8427,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
8427
}
8428
8429
// If profile is null/undefined or roles are requested, extract user info from the tokenset
8430
- if ((!profile || (strategy.custom.authorities.includes('roles')) && !profile.roles) && tokenset && tokenset.id_token) {
8430
+ if ((!profile || (Array.isArray(strategy.custom.authorities) && strategy.custom.authorities.includes('roles')) && !profile.roles) && tokenset && tokenset.id_token) {
8431
try {
8432
// Simple JWT decoder to extract user claims from id_token
8433
const parts = tokenset.id_token.split('.');