# How should we deal with logout if we login via sso?

**URL:** <https://community.directus.com/t/how-should-we-deal-with-logout-if-we-login-via-sso/1066>\
**Category:** Help\
**Tags:** authentication, api\
**Created:** [August 28, 2025, 1:29pm UTC](https://community.directus.com/t/how-should-we-deal-with-logout-if-we-login-via-sso/1066 "2025-08-28T13:29:53Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kanekoshoyu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/kanekoshoyu/32/861_2.png) [@kanekoshoyu](https://community.directus.com/u/kanekoshoyu)\
**Post date:** [September 4, 2025, 9:30pm UTC](https://community.directus.com/t/how-should-we-deal-with-logout-if-we-login-via-sso/1066/3 "2025-09-04T21:30:46Z")

</div>

I was struggling this as well today and I found the fix, here’s the link for your reference.  
I suppose you can access everything except logout, since logout somehow requires below POST request body

```auto
{"mode": "session"}

```

> [@SSO Logout URL?](https://community.directus.com/t/sso-logout-url/344/4):
>
> Found the fix. After more than a day of struggle chatting with ChatGPT with trial and error questioning my life decision, I found that I just need to add below as POST request body {"mode": "session"} Basically there are 3 modes in directus “json“ // more for debugging/testing I guess, no one wants to deal with tokens directly “cookie“ // deprecating it by not allowing it in UI “session” // the one we should go and with session, the session token in cookie includes the refresh\_token, so yo…

---

_[View the full topic](https://community.directus.com/t/how-should-we-deal-with-logout-if-we-login-via-sso/1066)._
