Welcome Guest, Not a member yet? Register   Sign In
Shared sessions database across domains
#1

[eluser]Ben Bowler[/eluser]
I have two sites in CodeIgniter sharing the same database. If I set the sessions table to be the same and use Ion_auth on both is it possible to have cross site authentication?
#2

[eluser]Kyle Johnson[/eluser]
I think you can accomplish this with some of the cookie related information, but I have no way of testing if this would work for sessions, but you might be able to somehow get a session based off of some cookie information.

Code:
/*
|--------------------------------------------------------------------------
| Cookie Related Variables
|--------------------------------------------------------------------------
|
| 'cookie_prefix' = Set a prefix if you need to avoid collisions
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
| 'cookie_path'   =  Typically will be a forward slash
| 'cookie_secure' =  Cookies will only be set if a secure HTTPS connection exists.
|
*/
$config['cookie_prefix'] = "cris_ci";
$config['cookie_domain'] = "";
$config['cookie_path']  = "/";
$config['cookie_secure'] = FALSE;




Theme © iAndrew 2016 - Forum software by © MyBB