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 by Discourse. I have used the following config below:
#!/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 provider
And in the discourse connect provider secrets I have entered 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:
{
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 Provider
for my site which will provide it with the user data that I can use across my website.