hasanyasin,
*
*
*splendid! Worked like a charm! I just used:*
*
*
*
app.use(express.session({
secret: "meta-meta",
store: new RedisStore,
cookie: { secure: false, maxAge:86400000 }
}));
and that gave +1 day for my session. Now it works on every system!
I just don't know how to thank you :) I've given +115 points of my
reputation on StackOverflow.com to you :) Couldn't imagine the problem was
in sessions
Thanks again!
*
2012/6/27 Ilya Rusanen <[email protected]>
> BTW, in express docs found smth like this:
>
> // "Remember me" for 15 minutes
> res.cookie('rememberme', 'yes', { expires: new Date(Date.now() + 900000),
> httpOnly: true });
>
>
> Looks like it's what I need. However in my code I don;t use similar ways
> of setting cookies, it may be set in automatic way or smth like that...
>
> 2012/6/27 Ilya Rusanen <[email protected]>
>
>> Thanks, hasanyasin,
>>
>> huh, I didn't ever think about cookies expiration date. Actually I don't
>> specify the *exact time* for cookies manually, I even don't know why
>> it's set exactly to 4 hours (I may suppose, it may be related with time
>> difference between Moscow and GMT time - 4 hours, but it's just a guess).
>> I'll try to get familiar with express cookies management and check up your
>> solution today, thank you very much!
>>
>>
>> 2012/6/27 hasanyasin <[email protected]>
>>
>>> Hello again Illya,
>>>
>>> I have tried the page and it works for me. Cookies are set without any
>>> problems. I logged in successfully. However, one thing caught my attention:
>>> expiration time. It is 6/26/12 23:18 GMT now and your cookie expiration is
>>> set to 27 Jun 2012 03:18 GMT, which leaves only 4 hours before cookie is
>>> expired.
>>>
>>> It is perfectly okay to set cookies that will expire in 4 hours; unless
>>> a client has wrong timezone set. Could you please make sure that the
>>> problem clients have the correct time zones set up? If I did not
>>> misunderstand your original post, you told that other browser had the same
>>> problem on the same OS. So I believe this is probably the reason of your
>>> problem.
>>>
>>> On systems I develop, I give cookies expiration times for one year. I
>>> validate cookies on server side. I do not use connect for cookie and
>>> session management since I am always more comfortable doing these things
>>> myself.
>>>
>>> I hope your problem is solved with this.
>>>
>>> --
>>> Job Board: http://jobs.nodejs.org/
>>> Posting guidelines:
>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>
>>
>>
>>
>> --
>> With best wishes,
>> Ilya Rusanen
>>
>> [email protected]
>>
>>
>
>
> --
> With best wishes,
> Ilya Rusanen
>
> [email protected]
>
>
--
With best wishes,
Ilya Rusanen
[email protected]
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en