# Session\_controller: Force SSL setting messes up SSO process

**URL:** <https://meta.discourse.org/t/session-controller-force-ssl-setting-messes-up-sso-process/113394>\
**Category:** Bug\
**Created:** [3 april 2019 om 22:51 UTC](https://meta.discourse.org/t/session-controller-force-ssl-setting-messes-up-sso-process/113394 "2019-04-03T22:51:11Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![technik](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@technik](https://meta.discourse.org/u/technik)\
**Post date:** [3 april 2019 om 22:51 UTC](https://meta.discourse.org/t/session-controller-force-ssl-setting-messes-up-sso-process/113394/1 "2019-04-03T22:51:11Z")

</div>

Hi,

i have a fully working discourse instance with SSO support.  
Everything is https.  
Recently I activated the force\_https option in the settings, because some browser promted the user, that parts of the website aren’t secure.  
Enabling this settings fixed this error, but resulted in a new one:

The SSO process is broken, if I activate the force\_https setting.

How can this be the case?

My php scripts redirects the user as usual:  
`https://domain.com/session/sso_login?sso=". $payload ."&sig=". $return_sig`  
But discourse opens up and doesn’t login the user, nor shows any kind of erros.

The logging shows only one single difference at the backtraces for the following line:  
NOT WORKING:

`/var/www/discourse/app/controllers/session_controller.rb:38:in `sso’`

WORKING:

`/var/www/discourse/app/controllers/session_controller.rb:165:in `sso\_login’`

Why does the session\_controller messes up the sso process?

Thanks a lot for your support 🙂

---

_[View the full topic](https://meta.discourse.org/t/session-controller-force-ssl-setting-messes-up-sso-process/113394)._
