widget chat 21

This commit is contained in:
Alma 2025-04-11 12:33:14 +02:00
parent 5efb920d9e
commit a0b0650a2c

View File

@ -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,