# How to log out user if I don't know them?

**URL:** <https://meta.discourse.org/t/how-to-log-out-user-if-i-dont-know-them/145273>\
**Category:** Development\
**Created:** [March 23, 2020, 5:20pm UTC](https://meta.discourse.org/t/how-to-log-out-user-if-i-dont-know-them/145273 "2020-03-23T17:20:20Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![pnoeric](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pnoeric/32/177144_2.png) [@pnoeric](https://meta.discourse.org/u/pnoeric)\
**Post date:** [March 26, 2020, 9:15am UTC](https://meta.discourse.org/t/how-to-log-out-user-if-i-dont-know-them/145273/7 "2020-03-26T09:15:04Z")

</div>

Thank you for your reply! I realized that this problem ultimately is all about managing the user on the main site.

If the user manually logs out of the main site, then I have to call Discourse (via API) to log them out there as well.

And if the user doesn’t log out but their session expires, I have to call Discourse to log them out there at the same time.

And finally: when a user logs out of Discourse using “log out” there, I need to capture that event (via webhook) and log them out on my site too.

Whee, integration!

---

_[View the full topic](https://meta.discourse.org/t/how-to-log-out-user-if-i-dont-know-them/145273)._
