The MU forums have moved to WordPress.org

Single Sign On on different domain (3 posts)

  1. PatrickLeblanc
    Member
    Posted 14 years ago #

    Hello,

    We're having a WordpressMU install on 2 differents domains. They don't share the DB ( although the users are mirrored daily ). We need to have single sign on going between the 2. We tried many things you can find for same domain like this http://fullthrottledevelopment.com/setting-a-single-login-across-wp-wpmu however it doesn't work. I even tried to create a fake cookie using firefox's webdeveloper. I suspect cookies won't be read if they don't belong to the same domain? So my solution would be to create another cookie with the other domain name on each blog?

    Cookies are not my field of expertise at all, any help would be appreciated.

    Thank you!

  2. andrea_r
    Moderator
    Posted 14 years ago #

    "So my solution would be to create another cookie with the other domain name on each blog?"

    Yep. :)

  3. PatrickLeblanc
    Member
    Posted 14 years ago #

    Any idea on how to achieve that? so far my attempts aren't exactly successful :P

    edit:
    I thought i'd give it a little more details:
    So far we have the exact same COOKIEHASH, AUTH_KEY etc. on the 2 blogs.

    I made a mu-plugin hooked to set_auth_cookie.

    I copy pasted the setcookie portion of pluggable.php wp_set_auth_cookie($user_id, $remember = false, $secure = '')

    replacing all the COOKIE_DOMAIN by COOKIE_DOMAIN2, which is defined in the wp-config.

    All the setcookies function returned true, so I assume the cookie has been well set, however Webdevelopper doesn't show the cookies for the other domain and I'm not logged in. So either the cookie is somehow set wrong or Firefox refuses it.

    Any ideas?

About this Topic

  • Started 14 years ago by PatrickLeblanc
  • Latest reply from PatrickLeblanc