# Single sing on with PHP

**URL:** <https://www.ruby-forum.com/t/single-sing-on-with-php/103107>\
**Category:** Rails\
**Created:** [May 1, 2007, 11:02pm UTC](https://www.ruby-forum.com/t/single-sing-on-with-php/103107 "2007-05-01T23:02:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harm\_de\_Laat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de053/32.png) [@Harm\_de\_Laat](https://www.ruby-forum.com/u/Harm_de_Laat)\
**Post date:** [May 1, 2007, 11:02pm UTC](https://www.ruby-forum.com/t/single-sing-on-with-php/103107/1 "2007-05-01T23:02:57Z")

</div>

Hi all,

For our next project we are required to integrate a rails application  
with a  
PHP application.  
The PHP application is going to be used to authenticate users. When the  
user  
is logged into the PHP application, the user should automatically be  
logged  
into the Rails application (Single Sign On).

What might be a good strategy to achieve this result? Maybe somebody did  
something like this before?

Regards,

Harm

---

<div class="post-metadata">

**Author:** ![Harm\_de\_Laat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de053/32.png) [@Harm\_de\_Laat](https://www.ruby-forum.com/u/Harm_de_Laat)\
**Post date:** [May 1, 2007, 11:13pm UTC](https://www.ruby-forum.com/t/single-sing-on-with-php/103107/2 "2007-05-01T23:13:00Z")

</div>

On 5/1/07, Harm de Laat [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> For our next project we are required to integrate a rails application with a  
> PHP application.  
> The PHP application is going to be used to authenticate users. When the user  
> is logged into the PHP application, the user should automatically be logged  
> into the Rails application (Single Sign On).
> 
> What might be a good strategy to achieve this result? Maybe somebody did  
> something like this before?

Cookies are the easiest way I have found. With a little effort you  
could use sessions… PHP sessions are plain text but ActiveRecord  
sessions are serialized by default.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![Harm\_de\_Laat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de053/32.png) [@Harm\_de\_Laat](https://www.ruby-forum.com/u/Harm_de_Laat)\
**Post date:** [May 2, 2007, 12:59am UTC](https://www.ruby-forum.com/t/single-sing-on-with-php/103107/3 "2007-05-02T00:59:12Z")

</div>

Hi Greg. I was quickly browsing your site and came across your  
database schema

[http://trac.rorcms.com/trac/cms/browser/doc/cms.png](http://trac.rorcms.com/trac/cms/browser/doc/cms.png)

I was wondering what program you used to create it 🙂

Thanks  
Akshay

---

<div class="post-metadata">

**Author:** ![Harm\_de\_Laat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de053/32.png) [@Harm\_de\_Laat](https://www.ruby-forum.com/u/Harm_de_Laat)\
**Post date:** [May 2, 2007, 4:48am UTC](https://www.ruby-forum.com/t/single-sing-on-with-php/103107/4 "2007-05-02T04:48:25Z")

</div>

On 5/1/07, sthapit [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi Greg. I was quickly browsing your site and came across your  
> database schema
> 
> [http://trac.rorcms.com/trac/cms/browser/doc/cms.png](http://trac.rorcms.com/trac/cms/browser/doc/cms.png)
> 
> I was wondering what program you used to create it 🙂

Omnigraffle.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)
