Topic: SSO - How To Integrate/Share Session With Web Application

I just cannot get SSO to work with my existing web application:

path to the calendar is /calendar/index.php

users login to web application /index.php

I set session variable $_SESSION['lcUser'] = 'user@email.com' when user logs-in

But I am unable to pass the session variable to Luxcal without starting a new session which seems to log user out of my web application..

I don't know if I'm explaining this very well but it seems impossible to integrate?

Re: SSO - How To Integrate/Share Session With Web Application

You can create a COOKIE generated by your WebApp and use something like:   

        // COOKIE must be serialized and user data in format
        // username:_:usermail
   
    $autokuki = 'MyAPP_COOKIE_NAME';
    $srvusr = @unserialize($_COOKIE[$autokuki]);
    if (strlen($srvusr) > 1) {
        $srvusrarr = explode(":_:",$srvusr);
        $_SESSION['lcUser'] = $srvusrarr[0];
    }

Paste this code in the index.php of the line immediately after: session_regenerate_id ();

Programmer - a binary-biological organism that turns coffee into software code