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:
- discourse/lib/single_sign_on_provider.rb at f364317625ee273d1e8983faa271831db912953b · discourse/discourse · GitHub
- discourse/lib/single_sign_on.rb at f364317625ee273d1e8983faa271831db912953b · discourse/discourse · GitHub
- discourse/lib/single_sign_on.rb at f364317625ee273d1e8983faa271831db912953b · discourse/discourse · GitHub
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_