# Discourse Wordpress plugin SSO wishlist

**URL:** <https://meta.discourse.org/t/discourse-wordpress-plugin-sso-wishlist/57797>\
**Category:** WordPress\
**Created:** [22 Febbraio 2017, 4:46pm UTC](https://meta.discourse.org/t/discourse-wordpress-plugin-sso-wishlist/57797 "2017-02-22T16:46:35Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [22 Febbraio 2017, 9:16pm UTC](https://meta.discourse.org/t/discourse-wordpress-plugin-sso-wishlist/57797/3 "2017-02-22T21:16:57Z")

</div>

> [@JagWaugh](#):
>
> When a user already has a preexisting account on WP, but the passwords aren’t identical if they try to use the SSO to login the error message is:

The issue isn’t that the passwords are different, they aren’t being checked. The error is being created by WordPress when it attempts to create a new user with an email that is already used. I think the problem is that the error message isn’t very clear. When there are existing accounts on both WordPress and Discourse, the user needs to log through WordPress to sync their accounts before they are able to use the Discourse login.

It would also be possible to add an option to the plugin to allow accounts to be synced through email addresses. This would make the process of syncing accounts between WordPress and Discourse a lot more straightforward. There is some risk in doing this, as email addresses can be edited on WordPress without the user having to confirm them.

> [@JagWaugh](#):
>
> How difficult would it be to add a Discourse log similar to admin/logs/staff\_action\_logs which tracked Login and SSO events?

It could be done, but I think it would have to be through a separate plugin. For now, errors are being logged. You can enable logging in your `wp-config.php` :

```plaintext
define( 'WP_DEBUG_LOG', true);
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);

```

Create a `debug.log` file in the `wp-content` directory to view the log.

> [@JagWaugh](#):
>
> At the moment the plugin is open to any discourse user. It would be nice if we could limit that, either by Trust Level, or by group membership.

Yes, I can see how that would be useful. It could be done, but it would be a bit of work to setup because the user information that would be required to do this isn’t returned by Discourse with the payload that’s being used to authenticate the user.

---

_[View the full topic](https://meta.discourse.org/t/discourse-wordpress-plugin-sso-wishlist/57797)._
