# Using Discourse Auth Proxy as an SSO Provider for another site

**URL:** <https://meta.discourse.org/t/using-discourse-auth-proxy-as-an-sso-provider-for-another-site/312872>\
**Category:** SSO\
**Created:** [June 20, 2024, 11:11am UTC](https://meta.discourse.org/t/using-discourse-auth-proxy-as-an-sso-provider-for-another-site/312872 "2024-06-20T11:11:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![bstgmr02](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@bstgmr02](https://meta.discourse.org/u/bstgmr02)\
**Post date:** [June 20, 2024, 11:11am UTC](https://meta.discourse.org/t/using-discourse-auth-proxy-as-an-sso-provider-for-another-site/312872/1 "2024-06-20T11:11:27Z")

</div>

My idea is simple, I would like to use Discourse as an SSO provider on one of my other websites. I was pointed to using [Discourse Auth Proxy](https://github.com/discourse/discourse-auth-proxy) by Discourse. I have used the following config below:

```plaintext
#!/bin/sh

# you are going to need to set the following env vars and run
# the image like this

PROXY_URL=http://0.0.0.0:80
ORIGIN_URL=https://mycustomsite.com
SSO_SECRET=RandomStringSecret
SSO_URL=https://my.discourseforum.com
HOST_PORT=7925

docker run -d --restart=always -e ORIGIN_URL=$ORIGIN_URL -e PROXY_URL=$PROXY_URL -e SSO_SECRET=$SSO_SECRET -e SSO_URL=$SSO_URL -p $HOST_PORT:80 discourse/auth-proxy

```

And inside of my Discourse forum I have enabled:

### enable [discourse connect](https://meta.discourse.org/t/13045?silent=true) provider

And in the [discourse connect](https://meta.discourse.org/t/13045?silent=true) provider secrets I have entered [https://mycustomsite.com](https://mycustomsite.com) with the RandomStringSecret as the secret. However I get this problem:

**Authentication failed due to missing secret. Contact the site administrators to fix this problem.**

I did try to decode the payload from the query params, and I got the following data back:

```plaintext
{
  return_sso_url: 'http://0.0.0.0:80/',
  nonce: '9431ad68-55b3-49a6-8b9a-a1d7209506e7'
}

```

Not sure if this is helpful, but I’ve been fighting with it for the past 2 hours. Please do let me know if I am using this for the right thing. I would like to create a basic [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) Provider  
for my site which will provide it with the user data that I can use across my website.

---

_[View the full topic](https://meta.discourse.org/t/using-discourse-auth-proxy-as-an-sso-provider-for-another-site/312872)._
