# How to use SSO (Discourse on subdomain)

**URL:** <https://meta.discourse.org/t/how-to-use-sso-discourse-on-subdomain/76630>\
**Category:** Self-hosting\
**Created:** [December 22, 2017, 3:53pm UTC](https://meta.discourse.org/t/how-to-use-sso-discourse-on-subdomain/76630 "2017-12-22T15:53:16Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Jean-Michel25](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@Jean-Michel25](https://meta.discourse.org/u/Jean-Michel25)\
**Post date:** [December 22, 2017, 5:14pm UTC](https://meta.discourse.org/t/how-to-use-sso-discourse-on-subdomain/76630/6 "2017-12-22T17:14:20Z")

</div>

Last question please about get\_key() and set\_key() functions

> // pretend that set\_key is a function that saves key value data in a database

Initially we store the nonce in a database (a single column table ?)  
When Discourse respond, we just check if nonce exists in the table ?  
If yes, we store login infos received from Discourse with the $\_GET  
(then store in PHP session…)

Is it ok ?

---

_[View the full topic](https://meta.discourse.org/t/how-to-use-sso-discourse-on-subdomain/76630)._
