Chat Session Not Reset on User Logout/Login
Description: After logging out and logging in as a different user, the embedded Flowise chat widget continues the previous user's chat session. The session context is not refreshed, causing the second user to see the first user's conversation history.
Root Cause: The Flowise chat widget retains the existing session ID across login/logout because a new session ID is not generated when initializing the chat for the new user.
Expected Behavior: Each time a user logs in, a fresh session ID should be generated and passed to the Flowise widget to start a new isolated chat session.
Chatbot.init({ chatflowid: "7fe888f9-2f9c-4cf3-a032-5410d9fa5fb0", apiHost: "http://localhost:3000", chatflowConfig: { "sessionId" : "Session_4", "vars": { "loannumber": "123448848" } } .....