user signout on unmount
Opened this issue · 5 comments
[Question]
I see in the code that window.Intercom('shutdown')
is called in componentWillReceiveProps()
and componentWillUnmount()
, however the session seems to persist when leaving the website and coming back. I also tried deleting cookies.
How can we ensure a session gets closed when user leaves the webpage?
(thanks for this package by the way, it's awesome!)
any updates on this issue?
I second this, how can we do a complete shutdown. Its not currently doing it on log out.
Bump - Dealing with this issue as well.
@hatched-esther The shutdown
is nothing more than removing the window.Intercom
and window.intercomSettings
object. Also make sure your Intercom related cookies are removed (this should have happened automatically when calling IntercomAPI('shutdown')
.
In case you're interested I've made an abstraction to make this more dev-friendly in React: https://github.com/devrnt/react-use-intercom