# Connection based logout

**URL:** <https://community.auth0.com/t/connection-based-logout/11754>\
**Category:** Get Help\
**Tags:** lock\
**Created:** [May 22, 2018, 3:38pm UTC](https://community.auth0.com/t/connection-based-logout/11754 "2018-05-22T15:38:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordan.eliastam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jordan.eliastam/32/5451_2.png) [@jordan.eliastam](https://community.auth0.com/u/jordan.eliastam)\
**Post date:** [May 22, 2018, 3:38pm UTC](https://community.auth0.com/t/connection-based-logout/11754/1 "2018-05-22T15:38:21Z")

</div>

In our software, we have users that connect via multiple types of connections which include samlp and auth0 database connections. We have added the `federated` flag to `logout` and that works for our SSO users, but for database connections they are redirected to a white page with `OK` printed on it. How can we redirect our database connections back to the login page while NOT redirecting our samlp users?

To reiterate, we would like to have users of the database connection be logged out and redirected to the login page while users of the SSO connection will be logged out and redirected to their IdP’s sign out URL.

thanks

---

<div class="post-metadata">

**Author:** ![sgmeyer](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sgmeyer/32/3387_2.png) [@sgmeyer](https://community.auth0.com/u/sgmeyer)\
**Post date:** [May 22, 2018, 7:34pm UTC](https://community.auth0.com/t/connection-based-logout/11754/2 "2018-05-22T19:34:54Z")

</div>

@jordan.eliastam auth0 doesn’t have any native functionality to do logical based redirects when logging out. Instead this would be up to your applications to make the decision. Using rules you could add a claim that showed how the user authenticated. Then track this as part of each application. From there your application would make the decision on where to redirect once logged out. This seems rather complex, but it is the only strategy I can think of to solve this problem.

---

<div class="post-metadata">

**Author:** ![jordan.eliastam](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jordan.eliastam/32/5451_2.png) [@jordan.eliastam](https://community.auth0.com/u/jordan.eliastam)\
**Post date:** [May 22, 2018, 7:55pm UTC](https://community.auth0.com/t/connection-based-logout/11754/3 "2018-05-22T19:55:05Z")

</div>

Thank you @sgmeyer. I was afraid that was going to be the solution!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 17, 2018, 10:58am UTC](https://community.auth0.com/t/connection-based-logout/11754/4 "2018-12-17T10:58:15Z")

</div>


