How to logout user when using discourse as a SSO provider

(zh99998) #1

Using Discourse as a SSO provider 继续讨论:

I’m using discourse as a SSO provider. it works well for login.
but when I’m trying to logout, I can’t any way to clean discourse session.
when I click login again, I can’t change account, just logged in as previous user.

(Sam Saffron) #2

Interesting, there is a “log out” button on every users admin page. The way I would do this.

  1. Create an admin api key.
  2. Create a shell web app that performs the logout on behalf of the user using the endpoint that the admin page uses. You need to be careful not to allow users to logout anyone but themselves.