# Discourse Wordpress plugin SSO wishlist

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

<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:** [2017 年 2 月 22 日午後 11:23 UTC](https://meta.discourse.org/t/discourse-wordpress-plugin-sso-wishlist/57797/4 "2017-02-22T23:23:18Z")

</div>

Here’s an approach that might help both with the problem of syncing existing users and with the problem of controlling access to which Discourse users can create accounts on WordPress.

- add an option to the plugin to redirect from the default login path of `yoursite.com/login` to the [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) provider URL.

- password protect `yoursite.com/wp-login.php` so that it is only accessible to site admins.

- change the logout redirect on your site so that it doesn’t try to bring users to `yoursite.com/wp-login.php`.

- add an option to the plugin to sync existing users by their email address

- for logging into WordPress, embed the login link directly on Discourse: `<a href="http://yoursite.com/?discourse_sso=1&redirect_to=http://yoursite.com/some-page">Login to WordPress</a>`

You could have fairly good control over who would be able to create an account on WordPress by either only displaying the WordPress login link on pages that are accessible to a certain level of user, or by using some javascript to display different login links on Discourse depending on the trust level of the current user. For example, a user with a trust level less than 3 could have a the link bring them to a page that explained that you need to know them better before they can create an account on the WordPress site.

The changes to the wp-discourse plugin that would be required for this to work are easy to make.

---

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