Skip to main content
September 16, 2008
Question

Single login for multiple domains

  • September 16, 2008
  • 1 reply
  • 264 views
Can anyone point out a blog or post of a single login for multiple domains? For example, let's say I own asite.com and bsite.com.

I want a user who logins to asite.com to also be logged into bsite.com if they visit that site. BSite.com is clearly a microsite of asite.com but we'd like to continue to use that domain if the visitor is on that site instead of redirecting them to keep login credentials

Thanks
    This topic has been closed for replies.

    1 reply

    Fernis
    Inspiring
    September 19, 2008
    If you're using cookie based login system, I'd imagine you could set a cookie to be valid for both of your sites.

    <cfcookie name="myAuthcookie" value="myAuthValue" domain=".asite.com;.bsite.com">

    That way both asite.com and bsite.com can read your cookie. Note the notation; always include the preceeding dot in the domain values. (two dots for top level domains, etc.)

    Strangely CFCOOKIE documentation doesn't mention anything about using semicolon separating multiple domains. It did in CF5 documentation, but not since.