Return_sso_url is blank but provided

Hello there,

i’d like to annoy you with this even tho i already created an issue on github.
However it’s been some hours without any answer and i am kinda in a hurry - and not even sure if this is the projects fault or a discourse bug.

It is about, which is a fork of

It inicially only ran against the configured rooturl which i adjusted to .../session/sso_provider, however after that discourse began to complain like “return_sso_url is blank, it must be provided”.
And the link was indeed missing this part at least as far as i looked, who knows, maybe it’s part of the nonce thingie? However i adjusted the code like this:

`print '<a href="' . $cfg_sso_url . '?sso=' . $payload . '&sig=' . $sig . '&return_sso_url=' . $cfg_url_base .'">Log In with SSO</a>';`

The result is something like:
…and still results into discourse complaining about a blank return url.

Any help would be great!

The return_sso_url needs to be in the payload. Have a look at the ‘Implement SSO in your web app’ section of the Using Discourse as a SSO provider topic.