# SSO logout - how to logout user from all applications?

**URL:** <https://community.auth0.com/t/sso-logout-how-to-logout-user-from-all-applications/190744>\
**Category:** Get Help\
**Tags:** sessions, logout\
**Created:** [August 18, 2025, 4:02pm UTC](https://community.auth0.com/t/sso-logout-how-to-logout-user-from-all-applications/190744 "2025-08-18T16:02:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![noelt.dolan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/noelt.dolan/32/60288_2.png) [@noelt.dolan](https://community.auth0.com/u/noelt.dolan)\
**Post date:** [August 18, 2025, 4:02pm UTC](https://community.auth0.com/t/sso-logout-how-to-logout-user-from-all-applications/190744/1 "2025-08-18T16:02:24Z")

</div>

Hi,

I have a SSO **logout** question. (Another one of those things that should be theory is easy, but in the real world isn’t.) Basically I have 4 different applications, all using different backend tech (python, typescript, ruby), with front-end either SPA or Next JS app. I’ve setup SSO to share login session across the apps, but when it comes to logging out, I seem to have a problem where if I logout of app A, I’m still logged-in to app B.

I’m sure this can’t be a new problem, so asking what is the best approach to ensure that logging out from app A, means I’ve logged from all ( app B, app C, app D)?

Thank you in advance,

Noel

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [August 19, 2025, 4:24pm UTC](https://community.auth0.com/t/sso-logout-how-to-logout-user-from-all-applications/190744/3 "2025-08-19T16:24:55Z")

</div>

Hi @noelt.dolan

Welcome back to the Auth0 Community!

From what you are describing, it appears that you are clearing the application session of the specific user but not their entire session with Auth0 so that the other applications are logged out as well. You can read more about the different session layers in our [documentation](https://auth0.com/docs/authenticate/login/logout#redirect-users-after-logout).

May I ask how is the user connected to multiple apps? Do all the apps use the same tenant with similar user stores? If so, you might want to either redirect the user to the `/logout` endpoint so that you completely erase their sessions with all their applications. However, if the user’s sessions are being persisted by those applications as well, you might want to look into [deleting all of their sessions](https://auth0.com/docs/api/management/v2/users/delete-sessions-for-user) by using the Management API.

If you have any other questions, let me know!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![noelt.dolan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/noelt.dolan/32/60288_2.png) [@noelt.dolan](https://community.auth0.com/u/noelt.dolan)\
**Post date:** [August 19, 2025, 8:08pm UTC](https://community.auth0.com/t/sso-logout-how-to-logout-user-from-all-applications/190744/4 "2025-08-19T20:08:25Z")

</div>

Hi Nik,

Thank you for taking the time to reply. In answer to your question, I’m using a single tenant which is shared by all the my apps (app A, app B, app C, etc). This being the case, they also all share the same user management setting. Also with this single tenant, I’ve created specific auth0 ‘Applications’ which I map to app\_metadata key/value to help give finer control over which user I allow full access to ‘my’ applications. (some user can access all, some only 1 or 2). So it’s the users that can access multiples of ‘my’ application that I want the single logout to end the session for all ‘my’ application.

Thank you again,

Noel

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [August 21, 2025, 2:54pm UTC](https://community.auth0.com/t/sso-logout-how-to-logout-user-from-all-applications/190744/5 "2025-08-21T14:54:17Z")

</div>

Great I could help regarding the issue that you are having!

If all the applications are stored in a single tenant and they have a shared database, the solution provided above should do the trick!

If you are experiencing additional challenged, please let me know!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![noelt.dolan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/noelt.dolan/32/60288_2.png) [@noelt.dolan](https://community.auth0.com/u/noelt.dolan)\
**Post date:** [August 22, 2025, 1:17pm UTC](https://community.auth0.com/t/sso-logout-how-to-logout-user-from-all-applications/190744/6 "2025-08-22T13:17:53Z")

</div>

Hi Nik,

I’ve followed the approach for deleting user sessions, which although the API request return successful (202), when I do a redirect/refresh, I’m still logged in. My expectation is that I would redirected back to our login page as that’s the behaviour where user hasn’t a session. Is there something more I need to do?

For reference, I’m using Next.js v14 to manage the UI in the first instance to test this approach.

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [August 25, 2025, 4:50pm UTC](https://community.auth0.com/t/sso-logout-how-to-logout-user-from-all-applications/190744/7 "2025-08-25T16:50:41Z")

</div>

Hi @noelt.dolan

Could you also let me know if you are using **Refresh Tokens** and different subdomains for all of your applications?

It appears that even if the Auth0 session is being cleared, the application session is being persisted since it does not check frequently enough for their session. As per our [documentation](https://auth0.com/docs/authenticate/login/logout/log-users-out-of-applications), this can be handled in two ways:

- Have short timeouts on your local session and redirect to Auth0 at short intervals to re-authenticate. This can be done by calling `checkSession` from the client which does this redirect in a hidden iFrame. If you take the hidden iFrame approach you need to be aware of **[rate limits](https://auth0.com/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy)** and third-party **[cookie](https://auth0.com/docs/manage-users/cookies)** issues.

- Handle this entirely at the application level by providing your applications a way to notify all other applications when a logout occurs.

Otherwise, one way you may implement this is possibly having your own session management API, a user logout on one app sets a flag there (posting the user\_id, email, connection, client\_id etc). You have key pages in your applications that poll your session management API and if a record exists for the user and connection, this indicates a logout has occurred (check if the logout is recent using a configurable threshold maybe) then within that application redirect the user to our [logout endpoint](https://auth0.com/docs/api/authentication#logout) and perform any [application level session](https://auth0.com/docs/authenticate/login/logout) clear up if relevant.

- [The Not-So-Easy Art of Logging Out](https://auth0.com/blog/the-not-so-easy-art-of-logging-out/)
- [Best Practices for application session management](https://auth0.com/blog/application-session-management-best-practices/)

If I can help you out with anything else regarding the matter, let me know!

Kind Regards,

Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [September 8, 2025, 4:51pm UTC](https://community.auth0.com/t/sso-logout-how-to-logout-user-from-all-applications/190744/8 "2025-09-08T16:51:21Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
