SSO client link giving error 500

For anyone else experiencing this error, I fixed it by filling in the sso provider secrets setting for the client domain name:

In the Discourse code, when this secret is not set, the call to OpenSSL::HMAC.hexdigest fails with the following error in the logs:

TypeError (no implicit conversion of nil into String) /var/www/discourse/lib/single_sign_on.rb:114:in `hexdigest’

Here is the relevant code path:

This error message should definitely be improved! _Edit: and it has been - see https://meta.discourse.org/t/confusing-unpolished-error-message-when-using-discourse-as-sso-provider/123762_