diff --git a/app/api/auth/[...nextauth]/route.ts b/app/api/auth/[...nextauth]/route.ts index 49422662..d59b5aa2 100644 --- a/app/api/auth/[...nextauth]/route.ts +++ b/app/api/auth/[...nextauth]/route.ts @@ -84,7 +84,7 @@ export const authOptions: NextAuthOptions = { console.log('JWT callback called with:', { token, account, profile }); if (account && profile) { - // Get user info from Rocket.Chat + // Get user info from Rocket.Chat using the admin token const userInfoResponse = await fetch(`${process.env.ROCKET_CHAT_URL}/api/v1/users.info?username=${token.username}`, { headers: { 'X-Auth-Token': process.env.ROCKET_CHAT_ADMIN_TOKEN as string,