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.

MSM and login across multiple domains

March 20, 2009 11:01am

Subscribe [4]
  • #1 / Mar 20, 2009 11:01am

    _Oli

    56 posts

    Hello,

    I’m trying to implement login in across multiple sites using the method decribed in the wiki.

    All is working well but when I press login, my browser goes through multiple refresh showing all the domains. I assume this is done to create cookies for each domains.

    Is this the only way to achieve this? I will have seven sites at the end of my project and I don’t want each logins to go through all the site each time. It’s ok in firefox or safari but ie makes a little clicking noise each time the browser refreshes and it might get a bit scary for users…?

  • #2 / Mar 20, 2009 11:15am

    Ingmar

    29245 posts

    What version of both EE and the MSM are you on? This is the first time I hear of such an issue.

  • #3 / Mar 20, 2009 11:27am

    _Oli

    56 posts

    I’m on latest build/version of everything… it is very weird…

    Can I pm you more info so you could have a look?

  • #4 / Mar 20, 2009 11:44am

    Ingmar

    29245 posts

    Let us try a few other things first… Are you using url rewriting (mod_rewrite) in any way? Any extensions?

  • #5 / Mar 20, 2009 12:30pm

    _Oli

    56 posts

    no htaccess just the solspace tag module/ext

    The routine is as follow.

    I go to http://www.site_a.com, login
    my browser goes to http://www.site_b.com/index.php?ACT=9&multi=a4fca31c72bd3c6fc2de1d9d3903e80f&cur=1&orig=0&orig_site_id=1 then comes back to http://www.site_a.com

    I am confused   😠

  • #6 / Mar 20, 2009 12:35pm

    _Oli

    56 posts

    I have tried with the extension disabled….

  • #7 / Mar 20, 2009 7:11pm

    Sue Crocker

    26054 posts

    _Oli, what version of IE are you trying this with?

    What exactly does your config.php line look like?

  • #8 / Mar 23, 2009 7:49am

    _Oli

    56 posts

    Hi Sue,

    I am on latest version and built.

    Here’s my config file

    $conf['app_version'] = "167";
    $conf['license_number'] = "";
    $conf['debug'] = "1";
    $conf['install_lock'] = "1";
    $conf['db_hostname'] = "localhost";
    $conf['db_username'] = "user";
    $conf['db_password'] = "password";
    $conf['db_name'] = "dbname";
    $conf['db_type'] = "mysql";
    $conf['db_prefix'] = "exp";
    $conf['db_conntype'] = "0";
    $conf['system_folder'] = "../../system/";
    $conf['cp_url'] = "http://www.site_a.com/system/index.php";
    $conf['doc_url'] = "http://expressionengine.com/docs/";
    $conf['is_system_on'] = "y";
    $conf['allow_extensions'] = "y";
    $conf['multiple_sites_enabled'] = "y";
    $conf['multi_login_sites'] = "http://www.site_a.com/site/index.php|http://www.site_b.com/index.php";
    $conf['forum_is_installed'] = "y";
    $conf['cookie_prefix'] = "oli_";

    And the path files are as follow.

    site_a

    $system_path = "../system/";
    $site_name = "site_a";
    $template_group = "site";
    $template = "index";
    $site_url = "http://www.site_a.com/site/";
    $site_index = "index.php";
    $site_404 = "";
    $global_vars = array();

    site_b

    $system_path = "/var/www/vhosts/site_a.com/httpdocs/system/";
    $site_name = "site_b";
    $template_group = "surface";
    $template = "index";
    $site_url = "http://site_b.com/";
    $site_index = "index.php";
    $site_404 = "";

    I have not done any work over the weekend but this morning, I still have the same issue..

    Hope you can help

    Thank you

  • #9 / Mar 23, 2009 3:53pm

    _Oli

    56 posts

    Anyone? I have scratched my head so much on this, I have a bald patch now 😊

  • #10 / Mar 23, 2009 8:19pm

    Greg Aker

    6022 posts

    interesting.  What version of Internet Explorer are you running?

    -greg

  • #11 / Mar 24, 2009 5:57am

    _Oli

    56 posts

    I’m on mac, Firefox and safari do the same… :(

  • #12 / Mar 24, 2009 6:30am

    _Oli

    56 posts

    Hi,

    I had just had a look at the mod.member_auth file and line 269 to 274 suggest that this is normal behavior (see below)... Could somebody please please please help me with this?

    Has anyone ever implemented this login across multiple sites?

    // Next Site
                    
                    $next_url = $sites[$next].'?ACT='.$FNS->fetch_action_id('Member', 'member_login').
                                '&multi;='.$IN->GBL('multi', 'GET').'&cur;='.$next.'&orig;='.$IN->GBL('orig').'&orig;_site_id='.$IN->GBL('orig_site_id', 'GET');
                                
                    return $FNS->redirect($next_url);

    Thank you

  • #13 / Mar 24, 2009 12:05pm

    Ingmar

    29245 posts

    The cookie settings are for a domain, not a URL. Since you are using the MSM you should add index.php, but nothing more. Try this

    $conf['multi_login_sites'] = "http://www.site_a.com/index.php|http://www.site_b.com/index.php";

    (Note the removal of “site” in the first domain.)

  • #14 / Mar 24, 2009 1:19pm

    _Oli

    56 posts

    Thank you very much for your reply.

    That sorted out the multiple redirect problem however, when I log on one site and travel to the other one, I don’t remain logged in.

    What do you think I could try next?

  • #15 / Mar 24, 2009 4:58pm

    Ingmar

    29245 posts

    Is there a reason you are using a cookie prefix? Also, what method of authentication for both the backend and the frontend are you using?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases