# 使用 Discourse SSo 登录后返回 WordPress

**URL:** <https://meta.discourse.org/t/redirecting-back-to-wordpress-after-signing-in-with-discourse-sso/87789>\
**Category:** WordPress\
**Created:** [2018 年5 月 18 日 00:28 UTC](https://meta.discourse.org/t/redirecting-back-to-wordpress-after-signing-in-with-discourse-sso/87789 "2018-05-18T00:28:56Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![Brad\_Bock](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brad_bock/32/82503_2.png) [@Brad\_Bock](https://meta.discourse.org/u/Brad_Bock)\
发布日期： [2018 年5 月 18 日 00:28 UTC](https://meta.discourse.org/t/redirecting-back-to-wordpress-after-signing-in-with-discourse-sso/87789/1 "2018-05-18T00:28:56Z")

</div>

I am helping someone to use their WordPress website set up as an SSO client to their Discourse forum with the WP-Discourse plugin. They would like to make the website accessible only to logged-in users.

I tried using the [Restricted Site Access plugin](https://wordpress.org/plugins/restricted-site-access/#description) to achieve this. I set it up so that it shows a page with the URL auto-generated by the WP-Discourse login shortcode; it seems however that the access plugin is restricting you from redirecting to the Discourse login page.

Is there a better way to do this? A different plugin for restricting access perhaps? The goal is to have un-authenticated users land on a page that describes the site and links to the [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) page where they can either create an account or sign in. After this, they should be redirected back to the site homepage (which will now be visible because they’re logged in).

Any help is greatly appreciated! cc @supermathie @simon

---

_[View the full topic](https://meta.discourse.org/t/redirecting-back-to-wordpress-after-signing-in-with-discourse-sso/87789)._
