XF 2.2 Is there a way to log out a user?

I have a website where users create accounts and log in, and I have a seperate xenforo installation.
  1. When a user creates an account on my website, then an API post creates a xenforo account for them.
  2. When the user clicks the forum URL, then the API will create a xenforo login token.
  3. And when a user logs out of my website, then I want them logged out of xenforo too.
 
So I have not found a solution yet, but I have discovered:
  1. If a user logs out of MyWebsite, I could POST a request to xenforo to change his status to "unconfirmed". This would make the forum "view only" for him. However, he would still be logged in, and generating a different login-token for another user would not log him out. This would only prevent him from using the forum.
  2. If a user logs out of MyWebsite, I could delete or reset their xenforo cookie with yesterday's expiry date (as discussed here). However, the user would still still remain logged in as normal until he physically closes his browser, at which time he will be logged out.
 
Top