Thanks. That makes sense. Unfortunately, I asked the wrong question after trying to figure out the answer myself.
How do I force a logout after some period of time? I thought expiring the session would do that. In web2py, I had to extend the time so my users would stay logged in for a longer period of time. Now I I want to ensure that aren't logged in for too long. Thanks. On Fri, Mar 20, 2020, 11:27 PM Massimo Di Pierro <massimo.dipie...@gmail.com> wrote: > Session and login information are not same. The latter is stored in the > former. When you logout it clears the login info in the session but does > not clear the session. There is no need. You can of course do > session.clear() if you want. > > Sessions tells py4web (or web2py) that you are the same user as before. > auth tells who you are and what you are authorized to do. > > On Tuesday, 3 March 2020 19:03:37 UTC-8, Carlos Hanson wrote: >> >> In chapter 4 of the documentation: >> >> By default py4web sessions never expire (unless they contain login >>> information, but that is another story) even if an expiration can be set. >> >> >> I see the truth in that statement, since I set the expiration in the >> session, but my session never expires. >> >> >> session = Session(secret=settings.SESSION_SECRET_KEY, expiration=settings >> .SESSION_EXPIRATION) >> >> >> What is the story about sessions containing login information? How do I >> ensure I am not logged in forever? >> >> Thanks. >> >> Carlos >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/7FEB2x2pSRM/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/858b1d31-2e0a-47b7-bee2-ce91dcc3c9ba%40googlegroups.com > <https://groups.google.com/d/msgid/web2py/858b1d31-2e0a-47b7-bee2-ce91dcc3c9ba%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CAHdZOTqJrxi5xwE3yATfCCX5DP6Nipb%3DsXQkzK-rtFYeeQ%2BJmQ%40mail.gmail.com.