# Perspective Logout Not Logging Out of All Sessions

**URL:** <https://forum.inductiveautomation.com/t/perspective-logout-not-logging-out-of-all-sessions/54127>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 14, 2021, 11:07pm UTC](https://forum.inductiveautomation.com/t/perspective-logout-not-logging-out-of-all-sessions/54127 "2021-12-14T23:07:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacob.ramirez](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@jacob.ramirez](https://forum.inductiveautomation.com/u/jacob.ramirez)\
**Post date:** [December 14, 2021, 11:07pm UTC](https://forum.inductiveautomation.com/t/perspective-logout-not-logging-out-of-all-sessions/54127/1 "2021-12-14T23:07:57Z")

</div>

The problem I’m running into is that when calling the `system.perspective.logout` function, I believe it is just logging out the user out of the current project.

So to give some context, I have 3 projects in question here and the user starts in the same order: projects 1, 2, and 3. 1 has no permissions so no need to authenticate. Then they navigate to project 2 and authenticate. Then they are passed to project 3 and the authentication from project 2 is passed over.

Now when call logout from project 3, then redirect them back to 1, then they go back to 2, the same user is still logged in.

Does `system.perspective.logout` just logout the user from the current project? And not any other projects?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 14, 2021, 11:14pm UTC](https://forum.inductiveautomation.com/t/perspective-logout-not-logging-out-of-all-sessions/54127/2 "2021-12-14T23:14:13Z")

</div>

Yes, and as I understand it, this is by design.  
There’s two separate ‘systems’ at play here - the IdP, and the Perspective session. system. **perspective**.logout only affects the Perspective session; your IdP session could still be valid. Many third party IdPs may not even allow external logout requests.

You could set Project 2 (and Project 3) to ‘Always Ask the IdP to reauthenticate’, in Project Properties → General:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/1/01c52213a4f67ef617116186e6184b6e46a7b4b4.png)  
[https://docs.inductiveautomation.com/display/DOC81/Project+Properties#ProjectProperties-GeneralProperties](https://docs.inductiveautomation.com/display/DOC81/Project+Properties#ProjectProperties-GeneralProperties)

---

<div class="post-metadata">

**Author:** ![jacob.ramirez](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@jacob.ramirez](https://forum.inductiveautomation.com/u/jacob.ramirez)\
**Post date:** [December 14, 2021, 11:30pm UTC](https://forum.inductiveautomation.com/t/perspective-logout-not-logging-out-of-all-sessions/54127/3 "2021-12-14T23:30:01Z")

</div>

From project 2 to 3, I don’t want the user to authenticate again. So I would enable this on project 2 only right?

So any time they access project 2 they are required to authenticate.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 14, 2021, 11:50pm UTC](https://forum.inductiveautomation.com/t/perspective-logout-not-logging-out-of-all-sessions/54127/4 "2021-12-14T23:50:04Z")

</div>

Sure, whatever you need for your requirements. You could also use `system.perspective.login` (instead of `logout`); there’s an optional `forceAuth` parameter that tries to force a login window when you switch. It might be harder to detect a transfer from 3 → 2 in that scenario, though.
