# WordPressとのSSOの問題解決

**URL:** <https://meta.discourse.org/t/sso-with-wordpress-help/80315>\
**Category:** WordPress\
**Created:** [2018 年 2 月 11 日午後 5:12 UTC](https://meta.discourse.org/t/sso-with-wordpress-help/80315 "2018-02-11T17:12:36Z")\
**Posts on this page:** 1\
**Showing post:** 10

<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:** [2019 年 5 月 24 日午後 5:01 UTC](https://meta.discourse.org/t/sso-with-wordpress-help/80315/10 "2019-05-24T17:01:27Z")

</div>

> [@CodySullivan](#):
>
> Any updates on whether this has been added to the plugin’s code, and/or is it likely something may have changed with Profile Builder to need a different solution?

This has not been added to the [WP Discourse](https://github.com/discourse/wp-discourse) code. If the code snippet from my previous post is not working for you, then it seems likely that something has changed with the Profile Builder plugin. I’ll take a look at what’s going on with it.

Edit: I just installed the Profile Builder plugin and configured it to ‘Enable Private Website.’ My login page on WordPress is at `/log-in`

When I set the [WP Discourse](https://github.com/discourse/wp-discourse) ‘Path to your Login Page’ option to `/log-in`, and add the following code to my theme’s `functions.php` file, I am being correctly redirected back to Discourse during the SSO login process:

```php
add_filter( 'login_redirect', 'wpdc_login_redirect_override' );
function wpdc_login_redirect_override( $redirect ) {
    $output = [];
    parse_str( parse_url( $redirect, PHP_URL_QUERY ), $output );
    if ( isset( $output['redirect_to'] ) ) {
        return $output['redirect_to'];
    }

    return $redirect;
}

```

If this isn’t working for you, it’s possible that the problem is being caused by something other than the Profile Builder plugin.

---

_[View the full topic](https://meta.discourse.org/t/sso-with-wordpress-help/80315)._
