A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
fix(auth): synchronize singleton OIDC group claims (#7089)
Riccardo23a28a4c90f0
diff --git a/packages/auth/events.ts b/packages/auth/events.tsindex c33037fa1..a7bf72251 100644--- a/packages/auth/events.ts+++ b/packages/auth/events.ts@@ -31,7 +31,8 @@ export const createSignInEventHandler = (db: Database): Exclude<NextAuthConfig["if (!dbUser) throw new Error("User not found");const groupsKey = env.AUTH_OIDC_GROUPS_ATTRIBUTE;- const profileGroups = profile ? getProfileValueByPath(profile, groupsKey) : undefined;+ const profileGroupsClaim = profile ? getProfileValueByPath(profile, groupsKey) : undefined;+ const profileGroups = typeof profileGroupsClaim === "string" ? [profileGroupsClaim] : profileGroupsClaim;// Groups from oidc provider are provided from the profile, it's not typed.if (!env.AUTH_OIDC_GROUPS_LOCAL_MANAGEMENT && dbUser.provider === "oidc" && Array.isArray(profileGroups)) {logger.debug(`Using profile groups (${groupsKey}): ${JSON.stringify(profileGroups)}`);