widget chat 21
This commit is contained in:
parent
5efb920d9e
commit
a0b0650a2c
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user