ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Login to MSM across multiple domains

November 04, 2010 5:19pm

Subscribe [7]
  • #1 / Nov 04, 2010 5:19pm

    willm

    30 posts

    I’ve been trying to setup multi site manager so that I can login to one control panel (e.g. domain1.com) and also be logged into other domains on the installation (domain2.com, domain3.com). I’ve set up the masked cp’s and their variables by copying the system/index.php file and everything works apart from being logged in to all domains cp’s at once.

    I can log into each individually, but not all at once. I’ve followed some of the instructions online but can’t seem to get it to work. Is there a guide for doing this in EE2, most of the instructions I’ve come across are for EE1.

  • #2 / Nov 05, 2010 10:01am

    Ingmar

    29245 posts

    The login routine can set cookies for multiple domains if needed. This allows users who run separate domains for each channel to have a way to enable users to log-in once and remain logged-in across domains. In order to use this feature this array index must be added to the config file:

    $conf['multi_login_sites'] = "http://www.example.com/|http://www.example.net";

    Use “cookies only”, and separate each domain with a pipe. If you’re using the MSM you should include “index.php” at the end of each domain name.

    Can you try that, please?

  • #3 / Nov 05, 2010 10:19am

    willm

    30 posts

    Yeh that’s one of the things I’ve tried but no luck. I’ve tried everything suggested here http://expressionengine.com/wiki/MSM_Troubleshooting_Login_Problems/

    I can log into each individually and be logged in at the same time, but not login in to one and be automatically logged into others. Is there anything else I could try?

  • #4 / Nov 06, 2010 12:41am

    Sue Crocker

    26054 posts

    Hi, Retro Willy. What version/build of EE2.x are you using? You can find that out in the bottom of any control panel page. (Check the footer, not the Info accessory.)

  • #5 / Nov 06, 2010 7:51am

    willm

    30 posts

    Hi Sue. I’m on v2.1.1 which is build 20101020

  • #6 / Nov 07, 2010 2:02pm

    Greg Salt

    3988 posts

    Hi Retro Willy,

    Does this work if you test it from a frontend login form on one of your site templates?

    Cheers

    Greg

  • #7 / Nov 07, 2010 2:16pm

    willm

    30 posts

    Hi Greg, no it doesn’t I’m afraid. The same thing happens

  • #8 / Nov 08, 2010 10:03am

    Sue Crocker

    26054 posts

    Retro Willy, what does your config.php setting look like:

    $conf['multi_login_sites']
  • #9 / Nov 08, 2010 10:36am

    willm

    30 posts

    $conf['multi_login_sites'] = "www.domain1.com/index.php|www.domain2.com/index.php";

    I’ve tried a few different variations with this… with and without the ‘www’, without the /index.php but no luck.

  • #10 / Nov 08, 2010 11:24am

    Neil Evans

    1403 posts

    just a thought… but a quick test to see if the cookies are being written would be to check from say FireFox’s developer tool bar which cookies are available on each domain. At least then you can identify if they are being created and then not read, or whether they are not being created in the first place. N

    I would also loose the index.php part and just have the domain.

    $conf['multi_login_sites'] = "www.domain1.com/|www.domain2.com/" ;
  • #11 / Nov 08, 2010 2:54pm

    willm

    30 posts

    It seems to be creating the cookies for each individual domain ok. Is there anything in particular I should be looking for? Should there be cookies created for domain2.com when I log in to domain1.com?

  • #12 / Nov 09, 2010 5:16am

    John Henry Donovan

    12339 posts

    Retro Willy,

    As its EE2 can you try the following using config instead of conf

    $config['multi_login_sites'] = "http://www.siteone.com/|http://www.sitetwo.com";

    Just to confirm. You are doing this so you are logged in across all sites in your frontend?

  • #13 / Nov 09, 2010 5:25am

    Ingmar

    29245 posts

    Adding to what john Henry said, be sure to keep the “http://” part, too.

  • #14 / Nov 09, 2010 5:40am

    willm

    30 posts

    Yeh I tried that too before, just tried it again and no joy. Something funny was happening when I had the trailing slash on the domain in ‘multi_login_sites’. When logging in to domain1.com on the front end it redirected me domain2.com but I wasn’t logged in. Removing the trailing slash seemed to fix that but don’t know why it was happening.

    Does multi login only work when logging in from the front end? I have been trying it from the cp login.

  • #15 / Nov 09, 2010 6:11am

    willm

    30 posts

    Something else to note, when logging into http://www.domain1.com I’m not logged in to domain1.com (that’s without ‘www’). This works when I add domain1.com to the ‘multi_login_sites’ too, but only when the domains are in a certain order in the list.

    This logs me into both domain1.com and http://www.domain1.com:

    $config['multi_login_sites'] = "http://www.domain1.com/|http://domain1.com/|http://www.domain2.com/|http://domain2.com/";

    Whereas this doesn’t:

    $config['multi_login_sites'] = "http://www.domain2.com/|http://domain2.com/|http://www.domain1.com/|http://domain1.com/";
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases