# 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:** 1

<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, 3:53pm UTC](https://meta.discourse.org/t/how-to-use-sso-discourse-on-subdomain/76630/1 "2017-12-22T15:53:16Z")

</div>

Hello

Many time to read topics, but I cannot undestand how to do.  
Maybe you can help me ?

We installed a Discourse forum on OVH VPS, subdomain of our site ([forum.mysite.com](http://forum.mysite.com))

Old users will be imported into Discourse Forum.  
New users will create account by Discourse Forum.  
All users will sign on with Discourse.  
OK

Our main site ([www.mysite.com](http://www.mysite.com)) is PHP/MySQL.  
My php pages have to know if the user is logged, his username, his group.  
How to do ?  
I can create PHP scripts, but I don’t know Ruby.

Maybe read session (cookie) ?

I found this but cannot find what to do with :

> <https://gist.github.com/paxmanchris/e93018a3e8fbdfced039>

Your help is welcome.  
Discourse is new for me…

Many thanks

---

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