Welcome Guest, Not a member yet? Register   Sign In
session expires earlier on community auth
#3

(12-20-2016, 08:20 PM)skunkbad Wrote:
(12-20-2016, 02:07 PM)allenxiao7 Wrote: I have started to the community auth for my project, very easy set up if just follow the instruction carefully.

Thanks to the great work, the basic functions work well.

I only found out a small issue, which I don't know if your guys also experienced. The $config['sess_expiration'] doesn't work exactly same as the seconds I set. For example, if I set this variable to 604800 (7 days/ a week), I found the session timed out around the 3rd day.


I am using CI 3.1.0

Allen

Allen, please show all of your session config. Have you looked at your cookie information immediately after logging in?

Hi Brian, thanks for your reply

Here is my session globals in config.php

$config['sess_driver'] = 'database';#'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 1209600;
$config['sess_save_path'] = 'ci_sessions';#NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = TRUE;#FALSE;

Quote:Have you looked at your cookie information immediately after logging in?
I just did on the Chrome, and found 4 cookies

Quote:Name: ci_session
Content: 050fa60ec3ccaf3958700dcf350cc60b2b6de7a0
Domain: 10.10.1.143
Path: /
Send for: Any kind of connection
Accessible to script: No (HttpOnly)
Created: Wednesday, December 21, 2016 at 11:28:58 AM
Expires: Wednesday, January 4, 2017 at 11:28:58 AM
Quote:Name: csrf_cookie_name
Content: b37f0986a623222e0477bc615af278db
Domain: 10.10.1.143
Path: /
Send for: Any kind of connection
Accessible to script: Yes
Created: Wednesday, December 21, 2016 at 11:28:58 AM
Expires: Wednesday, December 21, 2016 at 1:28:58 PM
Quote:Name: httpUser
Content: 4ba0d7660f0c1a7d8d936b1a7b08e957e3bb95940fd32342cb29a14578b3a7628fa796664a203d0b019f227972da47751a6afdfae0beab70937a7a04f99ebfa7Vl5StovO3MZxviZQ7CiUIb%2Bf2Ra3l%2FNbNBx7rrZiNdE%2BRpn9LSHqGfsNQ53FBGT%2B7Guw5LmWJ0oqhO0DhUq8CA%3D%3D
Domain: 10.10.1.143
Path: /
Send for: Any kind of connection
Accessible to script: Yes
Created: Wednesday, December 21, 2016 at 11:28:58 AM
Expires: When the browsing session ends
Quote:Name: httpsTokens
Content: da16dc191595577b135b095c8a44bd47728d53fb0d6b846c842cd269edc7f03f4ff034513443312eff85c56f98e36d19df43a3174d7c79c6878d551ee0b72290dCroBJhY5gMREfDPMjKUE37MU3hKjHbm64192W8CY%2BY%3D
Domain: 10.10.1.143
Path: /
Send for: Secure connections only
Accessible to script: Yes
Created: Wednesday, December 21, 2016 at 11:28:58 AM
Expires: When the browsing session ends
Reply


Messages In This Thread
RE: session expires earlier on community auth - by allenxiao7 - 12-21-2016, 12:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB