Canvas Log out

Hi Guys,

So how does canvas itself handle timeouts / re-logging in behind the scenes currently?
i.e. does it ping back to the tm1 server? Or how does it work exactly?
Have not have had time to do a deep dive into the backend and would prefer not having to code a log in from scratch as in this older feed here:

Thanks in advance,
Gerhard