# シングルサインアウト？

**URL:** https://meta.discourse.org/t/single-sign-out/88848
**Category:** SSO
**Created:** [2018 年 5 月 31 日午後 3:45 UTC](https://meta.discourse.org/t/single-sign-out/88848 "2018-05-31T15:45:56Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Amethi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amethi/32/88690_2.png) [@Amethi](https://meta.discourse.org/u/Amethi)
#### Post date: [2018 年 5 月 31 日午後 3:45 UTC](https://meta.discourse.org/t/single-sign-out/88848/1 "2018-05-31T15:45:56Z")

</div>

I’ve just implemented [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) (to my Identity Server 4 powered IDP, yay).

I take it there’s no single-sign-out capability, i.e. a ping to the IDP to let it know the user has signed-out, so they can be signed-out of the IDP and any other apps as well?

The situation where someone uses a public computer, signs-in to the IDP, uses Discourse, then signs-out of Discourse thinking they’re done, when actually they’re stilled signed-in with the IDP, which would allow anyone using the computer next to just click Sign-in to Discourse again and be authenticated without prompt concerns me.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018 年 5 月 31 日午後 3:50 UTC](https://meta.discourse.org/t/single-sign-out/88848/2 "2018-05-31T15:50:26Z")

</div>

Use Logout redirect to set your IDP logout link.

---

<div class="post-metadata">

### Author: ![Amethi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amethi/32/88690_2.png) [@Amethi](https://meta.discourse.org/u/Amethi)
#### Post date: [2018 年 5 月 31 日午後 4:06 UTC](https://meta.discourse.org/t/single-sign-out/88848/3 "2018-05-31T16:06:52Z")

</div>

Oh awesome, thanks. Works a treat.

---

<div class="post-metadata">

### Author: ![toondaey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toondaey/32/119908_2.png) [@toondaey](https://meta.discourse.org/u/toondaey)
#### Post date: [2018 年 5 月 31 日午後 4:57 UTC](https://meta.discourse.org/t/single-sign-out/88848/4 "2018-05-31T16:57:22Z")

</div>

Hi, I just implemented too. But it doesn’t redirect to the logout link for my website. Just logs out of discourse and attempts to login again.  
Is there anyway I can force it to redirect or trigger an event that will log the user out of the other site?  
Thanks.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018 年 5 月 31 日午後 4:58 UTC](https://meta.discourse.org/t/single-sign-out/88848/5 "2018-05-31T16:58:37Z")

</div>

That’d depend on how You’ve set up and what SSO engine you’re using! Can you describe your setup in a bit details?

---

<div class="post-metadata">

### Author: ![toondaey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toondaey/32/119908_2.png) [@toondaey](https://meta.discourse.org/u/toondaey)
#### Post date: [2018 年 5 月 31 日午後 5:04 UTC](https://meta.discourse.org/t/single-sign-out/88848/6 "2018-05-31T17:04:59Z")

</div>

I followed to the letter, every instruction in this post: [Official Single-Sign-On for Discourse (sso)](https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/13045) i.e. setup the sso login url, receive the payload and secret, verify the secret, create a url encoded base64 payload and hashed payload which was received on the forum and automatically logs on the user.

However, the user is not logged off the website when I log out of discourse as well as when the user session on the main site expires.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018 年 5 月 31 日午後 5:06 UTC](https://meta.discourse.org/t/single-sign-out/88848/7 "2018-05-31T17:06:38Z")

</div>

Did you set the logout redirect to the logout link of your website?

---

<div class="post-metadata">

### Author: ![toondaey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toondaey/32/119908_2.png) [@toondaey](https://meta.discourse.org/u/toondaey)
#### Post date: [2018 年 5 月 31 日午後 5:10 UTC](https://meta.discourse.org/t/single-sign-out/88848/8 "2018-05-31T17:10:12Z")

</div>

Oh, I didn’t see that. I just did now.

Thanks.

However, it still doesn’t solve the situation of user’s session expiration.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018 年 5 月 31 日午後 5:11 UTC](https://meta.discourse.org/t/single-sign-out/88848/9 "2018-05-31T17:11:08Z")

</div>

> [@toondaey](#):
>
> user’s session expiration.

Is the session being expired from discourse or your website?

---

<div class="post-metadata">

### Author: ![toondaey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toondaey/32/119908_2.png) [@toondaey](https://meta.discourse.org/u/toondaey)
#### Post date: [2018 年 5 月 31 日午後 5:11 UTC](https://meta.discourse.org/t/single-sign-out/88848/10 "2018-05-31T17:11:39Z")

</div>

It’s expired on my website.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2018 年 5 月 31 日午後 5:14 UTC](https://meta.discourse.org/t/single-sign-out/88848/11 "2018-05-31T17:14:00Z")

</div>

You will have to do something to send discourse a signal that the user session is expired maybe you can try tinkering with API ..

Other way I can think of is to reduce the discourse session time. This won’t actually sync logout on both platforms but will provide a leeway for sessions to be closed if a user is inactive for more than given time.

---

<div class="post-metadata">

### Author: ![toondaey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toondaey/32/119908_2.png) [@toondaey](https://meta.discourse.org/u/toondaey)
#### Post date: [2018 年 5 月 31 日午後 5:15 UTC](https://meta.discourse.org/t/single-sign-out/88848/12 "2018-05-31T17:15:18Z")

</div>

Thanks so much, I really appreciate your help.
