From 136627f226904b62fa0efc93e93959a3f5a9fde0 Mon Sep 17 00:00:00 2001 From: alma Date: Fri, 18 Apr 2025 14:42:50 +0200 Subject: [PATCH] session correction sidebar items 5 --- app/api/auth/[...nextauth]/route.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/api/auth/[...nextauth]/route.ts b/app/api/auth/[...nextauth]/route.ts index c5a0caad..956b6775 100644 --- a/app/api/auth/[...nextauth]/route.ts +++ b/app/api/auth/[...nextauth]/route.ts @@ -87,6 +87,11 @@ export const authOptions: NextAuthOptions = { clientId: getRequiredEnvVar("KEYCLOAK_CLIENT_ID"), clientSecret: getRequiredEnvVar("KEYCLOAK_CLIENT_SECRET"), issuer: getRequiredEnvVar("KEYCLOAK_ISSUER"), + authorization: { + params: { + scope: "openid profile email roles" + } + }, profile(profile) { console.log('Keycloak profile:', { rawRoles: profile.roles,