Le lien du client SSO renvoie une erreur 500

I have done the following to setup my word press as a SSO client:

On wordpress

  1. added all fields in the “connection” tab

  2. added by secret key

On discourse

  1. enable SSO provider

  2. add SSO secret key

Although, when i try and sign in I get the following screen.

Capture

How could I fix this?

My guess is that the problem is because of what you are asking about here:

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?

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.

Pour toute autre personne rencontrant cette erreur, je l’ai résolue en remplissant le paramètre sso provider secrets pour le nom de domaine du client :

Dans le code de Discourse, lorsque ce secret n’est pas défini, l’appel à OpenSSL::HMAC.hexdigest échoue avec l’erreur suivante dans les journaux :

TypeError (conversion implicite de nil en String échouée) /var/www/discourse/lib/single_sign_on.rb:114:in `hexdigest’

Voici le chemin de code concerné :

Ce message d’erreur devrait absolument être amélioré ! _Édité : et il l’a été — voir https://meta.discourse.org/t/confusing-unpolished-error-message-when-using-discourse-as-sso-provider/123762_