Nil secret on SSO

I am trying to setup Discourse as an SSO provider:

Problem is I am receiving an error, that I cannot seem to diagnose on my own.

$ curl http://dev.local/session/sso_provider?sso=bm9uY2U9MTExJnJldHVybl9zc29fdXJsPWh0dHA6Ly9hcGkubG9jYWwvYXV0aC9zc28%3D&sig=nmewmmiwyzhjowewztkxm2fingjjyzc4otvhmmu0odiymtqznzbizmyxyweyyjy5nmvhnmflmjfkmdyyowqyng%3D%3D

HTTP/1.1 500 Internal Server Error
...

The error logs show this:

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

I added a secret to the settings, so I am not sure why it is saying that the secret is nil. What am I missing?

Make sure you have added the SSO secret to the sso provider secrets site setting. That setting takes a list of domain/secret pairs. You can set the domain to * to allow the secret to be used for all domains.

If I add the secret to the sso secret setting, instead of the sso provider secrets setting, I get the error that you are reporting.

2 Likes

Thanks. I thought I did that. Will check again. I’m thinking maybe a typo in the domain? Actually, what I think I did was put it in both places. Maybe that was the mistake?

Will update when I get back to a computer.

Thanks for the response.

Okay … I feel a bit embarrassed by this one. I swear I looked at the setting about 30 times to make sure I had it setup right in the Admin Settings. But, of course, it was a typo. :man_facepalming:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.