web2py cookies never expire (unless the client deleted cookies) but
authentication does in two ways:

1) it check last acces datetime so you can change the expiration time
in seconds

auth.settings.expiration = 10000000000

2) admin deletes session files that have been unused in a while, so
delete

applications/admin/cron/expire_sessions.py


On May 1, 8:02 pm, Pystar <aitoehi...@gmail.com> wrote:
> Ok, thanks
> Example:
> How do I allow a user to stay logged in to my site for as long as
> possible? Or have the site remeber the user? without allowing the user
> log in again and again
>
> On May 2, 1:56 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
> wrote:
>
>
>
>
>
>
>
> > it does.
>
> > if 'counter' in request.cookies:
> >   # retrieve cookie
> >   counter = request.cookies['counter'].value +1
> > else:
> >   counter=1
>
> > # set cookie
> > response.cookies['counter'] = counter
>
> > request.cookies[name] is a Morsel 
> > Objecthttp://docs.python.org/library/cookie.html
>
> > Massimo
>
> > On May 1, 7:36 pm, Pystar <aitoehi...@gmail.com> wrote:
>
> > > In dealing with authentication and session do I need to deal with raw
> > > cookies? or does web2py handle that for me?

Reply via email to