# Invalid request - new plugin installation and setup

**URL:** https://meta.discourse.org/t/invalid-request-new-plugin-installation-and-setup/56414
**Category:** WordPress
**Created:** [2017年一月26日 20:03 UTC](https://meta.discourse.org/t/invalid-request-new-plugin-installation-and-setup/56414 "2017-01-26T20:03:50Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![homebrewhops](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/homebrewhops/32/32984_2.png) [@homebrewhops](https://meta.discourse.org/u/homebrewhops)
#### Post date: [2017年一月26日 20:03 UTC](https://meta.discourse.org/t/invalid-request-new-plugin-installation-and-setup/56414/1 "2017-01-26T20:03:50Z")

</div>

I have followed the steps outlined for installation and setup of wp-discourse. Pinned here and on the wp-discourse git wiki.

When I navigate to my discourse forum and click login, I am presented with the wordpress login screen. After entering credentials, the page displays invalid request and the url reads:

[http://wordpress.domain.com/login?sso=bm9uY2U9ZjkxYzRhM2FhMDZmYjY0YzQ3NTUxOWU0YTk2YjY5MDMmcmV0dXJuX3Nzb191cmw9aHR0cCUzQSUyRiUyRmZvcnVtLnBpZGdlLm5ldCUyRnNlc3Npb24lMkZzc29fbG9naW4%3D&sig=9d98737440c1fdbdfdf8f2485e30cb1548f7ee929ce9e28194442f48c239647c](http://wordpress.domain.com/login?sso=bm9uY2U9ZjkxYzRhM2FhMDZmYjY0YzQ3NTUxOWU0YTk2YjY5MDMmcmV0dXJu%0BX3Nzb191cmw9aHR0cCUzQSUyRiUyRmZvcnVtLnBpZGdlLm5ldCUyRnNlc3Np%0Bb24lMkZzc29fbG9naW4%3D%0B&sig=9d98737440c1fdbdfdf8f2485e30cb1548f7ee929ce9e28194442f48c239647c)

Where do I begin to check for what might be going wrong?

---

<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年一月26日 20:39 UTC](https://meta.discourse.org/t/invalid-request-new-plugin-installation-and-setup/56414/2 "2017-01-26T20:39:14Z")

</div>

Have you set the ‘sso secret’ on both the Discourse forum and on WordPress? They need to be set to the same value.

---

<div class="post-metadata">

### Author: ![homebrewhops](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/homebrewhops/32/32984_2.png) [@homebrewhops](https://meta.discourse.org/u/homebrewhops)
#### Post date: [2017年一月26日 20:43 UTC](https://meta.discourse.org/t/invalid-request-new-plugin-installation-and-setup/56414/3 "2017-01-26T20:43:01Z")

</div>

Yay! It was a mismatched secret! Thank you!

---

<div class="post-metadata">

### Author: ![Oilsgift](https://avatars.discourse-cdn.com/v4/letter/o/bc79bd/32.png) [@Oilsgift](https://meta.discourse.org/u/Oilsgift)
#### Post date: [2019年一月29日 04:20 UTC](https://meta.discourse.org/t/invalid-request-new-plugin-installation-and-setup/56414/4 "2019-01-29T04:20:26Z")

</div>

I would just like to add to this, I was having the same exact issue as @homebrewhops with the sso redirecting to login page, and after logging in seeing “invalid request” In my case however., I did not have a mismatched secret. The secret I was using was: DT\>ZMF7a6Q$WesK . The Wordpress discourse plugin specifies:

The secret key used to verify [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) requests. Set it to a string of text, at least 10 characters long. It needs to match the key set at [https://forum.oilsgift.com/admin/site\_settings/category/all\_results?filter=sso](https://forum.oilsgift.com/admin/site_settings/category/all_results?filter=sso).

one or several of the characters used in my SSO Secret Key was causing the error. So do make sure that it is a “string of text” as specified, also numbers did work for me, so just the special characters should be avoided.

The PrimeTime WordPress + [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) plugin had no problem authenticating with this same SSO key, so I’m certain the ability to use special characters could be implemented into the official Discourse App.

Anyway I hope this may help someone that is having trouble as I did and can save you some time. Good Luck.

---

<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年一月29日 07:27 UTC](https://meta.discourse.org/t/invalid-request-new-plugin-installation-and-setup/56414/5 "2019-01-29T07:27:25Z")

</div>

`DT>ZMF7a6Q$WesK` should work for the SSO secret. If a space is added at the start or the end of the key, the plugin isn’t stripping the space. Discourse does trim spaces when it saves the key. Maybe that was the problem.

---

<div class="post-metadata">

### Author: ![Oilsgift](https://avatars.discourse-cdn.com/v4/letter/o/bc79bd/32.png) [@Oilsgift](https://meta.discourse.org/u/Oilsgift)
#### Post date: [2019年一月29日 07:42 UTC](https://meta.discourse.org/t/invalid-request-new-plugin-installation-and-setup/56414/7 "2019-01-29T07:42:25Z")

</div>

It could be that it was related to something else, because I did make sure that there were no spaces at the beginning or left at the end of the key on both the Wordpress and Discourse sides. I do have a custom wp-login.php that things get redirected to so maybe that was the issue?

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2019年一月29日 08:43 UTC](https://meta.discourse.org/t/invalid-request-new-plugin-installation-and-setup/56414/8 "2019-01-29T08:43:01Z")

</div>

Have you customised wp-login.php directly or just modified login from your theme’s functions.php

---

<div class="post-metadata">

### Author: ![Oilsgift](https://avatars.discourse-cdn.com/v4/letter/o/bc79bd/32.png) [@Oilsgift](https://meta.discourse.org/u/Oilsgift)
#### Post date: [2019年一月29日 09:14 UTC](https://meta.discourse.org/t/invalid-request-new-plugin-installation-and-setup/56414/9 "2019-01-29T09:14:14Z")

</div>

I added a rewrite rule to the .htaccess file:

`RewriteRule ^wp-signup.php(.*)$ wp-content/themes/divi-child/wp-signup.php$1`

and after copying over the wp-signup.php to the child theme, made a few edits, but that was just to text on the page no code.
