SSO - Two Feature Requests


(Adam) #1

This plug-in works great, it is missing two things in my opinion.

1. Logout both WordPress and Discourse
If a user logs out of Discourse they remain logged into WordPress.

2. Transfer new Discourse Registrations to WordPress
If a user registers on Discourse.
They come back the next day and click LOGIN on WordPress. It will fail.
They instead have to click the “Login with Discourse” button. A usability issue?

How to fix (1) I have no idea. How to fix (2) however half of the code must be there? as with SSO if I click the “Login with Discourse” it creates the user. Why not create it on registration?

Love to know if plug-in can be updated for (2), before I bash together a script that if a username does not exist in WordPress but does exist on Discourse. To then transfer the user to the SSO URL? … They will only have to do this once.


(Simon Cossar) #2

You can do this now. Search for ‘logout redirect’ on your Discourse forum’s settings page. Add the url http://yoursite.com/?request=logout to that field.

I’ll look at this some more. The easiest approach would be to style the ‘Login with Discourse’ link as a button.


(Simon Cossar) #3

This could be done with a Discourse web hook, but it’s a lot easier to just let the user be created when they click on the link. Would something like this solve the problem? (the logo would need to be configurable)