How to sync logout with SSO or Browser session?

It is sad that the code was reverted as it had considerable value in situations like this.

Can you please provide pointers to the Discourse calls necessary to terminate the sessions.

Thanks Rafael