From 4e19f9b3bd95c99052a487b2a19df1f46389e580 Mon Sep 17 00:00:00 2001 From: alma Date: Fri, 18 Apr 2025 15:02:57 +0200 Subject: [PATCH] session correction sidebar items 8 --- app/api/auth/[...nextauth]/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/auth/[...nextauth]/route.ts b/app/api/auth/[...nextauth]/route.ts index 39c7c5ef..cbb2f693 100644 --- a/app/api/auth/[...nextauth]/route.ts +++ b/app/api/auth/[...nextauth]/route.ts @@ -107,7 +107,7 @@ export const authOptions: NextAuthOptions = { console.log('Raw roles from Keycloak:', roles); // Clean up roles by removing ROLE_ prefix and converting to lowercase - const cleanRoles = roles.map(role => + const cleanRoles = roles.map((role: string) => role.replace(/^ROLE_/, '').toLowerCase() );