widget chat 14
This commit is contained in:
parent
820fdab2a0
commit
8d896cbd6e
@ -157,6 +157,7 @@ export const authOptions: NextAuthOptions = {
|
|||||||
|
|
||||||
if (userInfo.user && userInfo.user._id) {
|
if (userInfo.user && userInfo.user._id) {
|
||||||
rocketChatUserId = userInfo.user._id;
|
rocketChatUserId = userInfo.user._id;
|
||||||
|
console.log('Found user ID:', rocketChatUserId);
|
||||||
} else {
|
} else {
|
||||||
console.error('No user ID found in Rocket.Chat response');
|
console.error('No user ID found in Rocket.Chat response');
|
||||||
return newToken;
|
return newToken;
|
||||||
@ -198,7 +199,10 @@ export const authOptions: NextAuthOptions = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (personalToken && rocketChatUserId) {
|
if (personalToken && rocketChatUserId) {
|
||||||
console.log('Setting Rocket.Chat credentials in token');
|
console.log('Setting Rocket.Chat credentials in token:', {
|
||||||
|
token: personalToken,
|
||||||
|
userId: rocketChatUserId
|
||||||
|
});
|
||||||
return {
|
return {
|
||||||
...newToken,
|
...newToken,
|
||||||
rocketChatToken: personalToken,
|
rocketChatToken: personalToken,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user