# Need single sign on solution?

**URL:** <https://www.ruby-forum.com/t/need-single-sign-on-solution/131034>\
**Category:** Ruby\
**Created:** [March 5, 2008, 12:41pm UTC](https://www.ruby-forum.com/t/need-single-sign-on-solution/131034 "2008-03-05T12:41:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [March 5, 2008, 12:41pm UTC](https://www.ruby-forum.com/t/need-single-sign-on-solution/131034/1 "2008-03-05T12:41:48Z")

</div>

Hi All,  
I am doing my site user authentication through LDAP server and my  
company has 3 more sites with different technologies and they are also  
doing user authentication through LDAP server.  
Now we want that when user logged in my application [1.domain.com](http://1.domain.com) then  
user also logged in other application [2.domain.com](http://2.domain.com) and [3.domain.com](http://3.domain.com).  
Please help me out.  
I will be so thankful to all of you?

If u r saying bout session or cookies please give some code example or  
detailed description.

Thanks & Regards,  
Varun G.

---

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [March 5, 2008, 5:21pm UTC](https://www.ruby-forum.com/t/need-single-sign-on-solution/131034/2 "2008-03-05T17:21:44Z")

</div>

Varun G. wrote:

> detailed description.
> 
> Thanks & Regards,  
> Varun G.

Conceptually, you can assign a session cookie scoped to your domain. So  
every host on the domain will receive the cookie with each request. The  
cookie can be a key that is stored in the LDAP server or an application  
you write. When queried with the key it will return the user data. You  
can also encrypt the user data into the cookie itself. This would  
require each app that uses the cookie know how to decrypt it.

Cookies are set differently for different frameworks and libs. See your  
framework or lib documentation for specifics. The domain part of the  
cookie should be something like “.example.com”

Dan
