kerindar has asked for the wisdom of the Perl Monks concerning the following question:
then when the user logs in, and I check the parameters from the log in form, compare them to the database, and set the session parameter login to true, everything works. Except, once they close their browser and come back later they have to log in again. This works perfectly like I expect, so then I go further to see if I can get automated logins to work ... If I try to create a cookie with a specific time then I end up with the user constantly logging in for every mode/page they try to visit - am I writing this incorrectly?my $self = shift; my $q = $self->query(); my $session = $self->session;
I figure I probably need to do some kind of cookie comparison or something? I don't know when/where/how to do this if this is the case. If I am being vague and we need more information of what I am doing I'll gladly write more. I just hope this is a good starting point.my $self = shift; my $q = $self->query(); my $sid = $q->cookie("CGISESSID") || undef; $self->session_config ( CGI_SESSION_OPTIONS => [ "driver:File", $q, {Directory=>'/tmp'} ], COOKIE_PARAMS => { -expires => '+1M', -secure => 1, }, SEND_COOKIE => 1, ); my $session = $self->session;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI::Application::Session Cookies confusion
by punkish (Priest) on Sep 24, 2004 at 18:39 UTC | |
by kerindar (Initiate) on Sep 24, 2004 at 22:40 UTC | |
by saberworks (Curate) on Sep 25, 2004 at 01:19 UTC |