How to clear session on livechat after attendance


#1

When I go into a new service, I’m already directed to the conversation screen, because I was previously included. My desire is to disable the session, so that the next time the user accesses LIVECHAT the pre-registration form is shown and a new token is generated.

Can you help me?


#2

Did you solve this? I’d like to know the same thing.


#3

Hey John!!

I decided!

You can implement in the file livechat.js, in the part where the chat is closed, the line:
localStorage.clear ();

This command clears what is in the browser memory, which is the chat information and the token.

If you have any further questions, I can help you.


#4

Is this in the closeWidget function?


#5

John, is this in the “click .end-chat”:function.

you need to put the command inside the function .then(function (t){.

see if you can see the image I submitted above.


#6

Awesome! Thank you! :grin: