Absolutely both should be decorated. You solve the problem by having some periodic ajax ping that keeps the session alive
On Wednesday, 1 November 2017 09:37:28 UTC-5, Pierre wrote: > > hello everyone, > > I have a decorated action | controller (@auth.requires_login()) making an > ajax call to perform another action. Some time ago I realized that user > session might expire while the ajax is being processed so if ajax secondary > action does something like : *user = auth.user_id* and session has ended > i get *user=None* and actions won't get through > In such situation is it good practice to forward the auth.user record (at > list auth.user_id) sothat it's available to use by the ajax ? or should > both actions be decorated ? > > -- 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. For more options, visit https://groups.google.com/d/optout.