I would like to know if it is possible to share Authentication cookies
between 2 url’s with ruby. Does anyone know how to?
thanks
I would like to know if it is possible to share Authentication cookies
between 2 url’s with ruby. Does anyone know how to?
thanks
On Jun 26, 10:50 pm, Sam G. [email protected]
wrote:
I would like to know if it is possible to share Authentication cookies
between 2 url’s with ruby. Does anyone know how to?
Well for starters the contents of the authentication cookie needs to
contain something the 2 apps understand (assuming it’s two different
apps), so for example just sticking user.id in the cookie won’t be
enough if user ids don’t match between the 2 apps.
Secondly you’ll have to set the domain of the cookie appropriately.
Normally if you go to foo.bar.com you’ll get a cookie valid for
foo.bar.com. Instead you need to set the domain of the cookie to
‘.bar.com’ which means that anything ending in bar.com will receive
your cookie
Fred
Well for starters the contents of the authentication cookie needs to
contain something the 2 apps understand (assuming it’s two different
apps), so for example just sticking user.id in the cookie won’t be
enough if user ids don’t match between the 2 apps.
Secondly you’ll have to set the domain of the cookie appropriately.
Normally if you go to foo.bar.com you’ll get a cookie valid for
foo.bar.com. Instead you need to set the domain of the cookie to
‘.bar.com’ which means that anything ending in bar.com will receive
your cookieFred
I forgot to mention that the 2 URL’s are completely different but they
are using the same database. I’m not sure if this is possible two write
one cookie that checks authentication for both sites. If this does not
work is there any other way I can do this?
thanks
On 27 Jun 2008, at 12:06, Sam G. wrote:
your cookie
Fred
I forgot to mention that the 2 URL’s are completely different but
they
are using the same database. I’m not sure if this is possible two
write
one cookie that checks authentication for both sites. If this does not
work is there any other way I can do this?
In that case you can’t share a cookie. Have you considered OpenID ?
Fred
Frederick C. wrote:
On 27 Jun 2008, at 12:06, Sam G. wrote:
In that case you can’t share a cookie. Have you considered OpenID ?Fred
I’m not familiar with that what is it?
Frederick C. wrote:
On 27 Jun 2008, at 12:21, Sam G. wrote:
Frederick C. wrote:
On 27 Jun 2008, at 12:06, Sam G. wrote:
In that case you can’t share a cookie. Have you considered OpenID ?Fred
I’m not familiar with that what is it?
There’s a rails plugin for it
Fred
can’t thank you enough for all your help.
kind regards
mauro
On 27 Jun 2008, at 12:21, Sam G. wrote:
Frederick C. wrote:
On 27 Jun 2008, at 12:06, Sam G. wrote:
In that case you can’t share a cookie. Have you considered OpenID ?Fred
I’m not familiar with that what is it?
There’s a rails plugin for it
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs