I have done the following to setup my word press as a SSO client:
On wordpress
added all fields in the “connection” tab
added by secret key
On discourse
enable SSO provider
add SSO secret key
Although, when i try and sign in I get the following screen.
How could I fix this?
simon
06.Май.2018 01:07:48
2
Sami_Syed:
How could I fix this?
My guess is that the problem is because of what you are asking about here:
I am using my wordpress site to function as an SSO client. Meaning Discourse authenticates all users (logins, registrations, etc…).
After editing my htaccess file to increase my wordpress site speed. I noticed that the following error started to appear when I try and login “discourse_sso_error=expired_nonce”.
I looked through the forum and found out that the issue is probably because of the htaccess file. Although, I want to know what exactly I should remove from it. So that I can keep my site…
Could you try using the default WordPress .htaccess configuration and see if you are still getting an error?
Instead I just reverted back to a wordpress backup from 2 days ago (with the original htaccess file). Although, the problem was still there. But when I cleared all my cache. cookies and history, it started to work again.
Kind of a weird situation but im glad I sorted it out.
Do you think the wp optimize plugin could have anything to do with this?
simon
06.Май.2018 01:21:46
5
I don’t know. If you can figure that out, and why that is the case, please let us know. We can’t get into a lot of WordPress development on this forum, but it’s good to know about conflicts between the WP Discourse plugin and any other WordPress plugins. It makes debugging issues a lot easier.
nylen
(James Nylen)
23.Июль.2019 07:12:38
6
Для тех, кто столкнулся с этой ошибкой, я исправил её, заполнив настройку «secrets провайдера SSO» для домена клиента:
В коде Discourse, когда этот секрет не задан, вызов OpenSSL::HMAC.hexdigest завершается ошибкой с следующим сообщением в логах:
TypeError (неявное преобразование nil в String) /var/www/discourse/lib/single_sign_on.rb:114:in `hexdigest’
Вот соответствующий путь в коде:
Сообщение об ошибке определённо следует улучшить! _Edit: и оно было улучшено — см. https://meta.discourse.org/t/confusing-unpolished-error-message-when-using-discourse-as-sso-provider/123762_