# Никаких секретов по SSO

**URL:** <https://meta.discourse.org/t/nil-secret-on-sso/121103>\
**Category:** Support\
**Created:** [23.Июнь.2019 12:46:14 UTC](https://meta.discourse.org/t/nil-secret-on-sso/121103 "2019-06-23T12:46:14Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![admhpkns](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/admhpkns/32/120869_2.png) [@admhpkns](https://meta.discourse.org/u/admhpkns)\
**Post date:** [23.Июнь.2019 12:46:14 UTC](https://meta.discourse.org/t/nil-secret-on-sso/121103/1 "2019-06-23T12:46:14Z")

</div>

I am trying to setup Discourse as an SSO provider:

> [@Use Discourse as an identity provider (SSO, DiscourseConnect)](https://meta.discourse.org/t/using-discourse-as-a-sso-provider/32974):
>
> So you want to use Discourse as an identity provider for your own web app? Great! Let’s get started. Enable [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) provider setting Under Discourse admin site settings (/admin/site\_settings) enable setting enable discourse connect provider and add a secret string to discourse connect provider secrets (used to hash SSO payloads). Implement [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) in your web app: Generate a random [nonce](https://en.wikipedia.org/wiki/Cryptographic_nonce). Let’s call this value NONCE. Save it temporarily so that you can verify it with the …

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

```plaintext
$ 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:

```plaintext
 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?

---

_[View the full topic](https://meta.discourse.org/t/nil-secret-on-sso/121103)._
