# What exactly goes on when DELETE /session/username is invoked?

**URL:** <https://meta.discourse.org/t/what-exactly-goes-on-when-delete-session-username-is-invoked/53993>\
**Category:** Development\
**Created:** [2016 年12 月 9 日 00:37 UTC](https://meta.discourse.org/t/what-exactly-goes-on-when-delete-session-username-is-invoked/53993 "2016-12-09T00:37:56Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

作者： ![Kevin\_Wildenradt](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kevin_wildenradt/32/62507_2.png) [@Kevin\_Wildenradt](https://meta.discourse.org/u/Kevin_Wildenradt)\
发布日期： [2016 年12 月 9 日 01:01 UTC](https://meta.discourse.org/t/what-exactly-goes-on-when-delete-session-username-is-invoked/53993/3 "2016-12-09T01:01:22Z")

</div>

@sam thanks for your quick reply. I do not want log out strict. It logs the user out of every session on every device, I just want to log the user out on the current device. I am logging the user out of Discourse as part of my own site’s logout flow. Discourse is a subdomain of my domain, so my endpoint gets its cookies. My question is if it is good practice to simply set the user’s token cookie to empty myself without ever talking to discourse, which judging from the code you provided seems to be the case. Please correct me if that’s wrong, otherwise, thanks for your help!

---

_[View the full topic](https://meta.discourse.org/t/what-exactly-goes-on-when-delete-session-username-is-invoked/53993)._
