Hi
an expired session becomes empty but this does not seem to always trigger auth.requires_login redirection to the login URL neither when set via auth.requires_login(loginURL), aka the otherwise parameter, nor by auth.settings.on_failed_authorization = loginURL
when XMLHttpRequest (XHR) is used.Actually the otherwise parameter is superfluous in this case.
Status 401 UNAUTHORIZED with response
<div class="not-authorized alert alert-block"><h4>NOT AUTHORIZED</h4>Please <a href="">login</a> to view this content.</div>
but that is never seen since I am using
www.idangero.us/framework7 , which loads all links with Ajax by default, does not refresh the page.
So this probably happens because the call is being treated as a component by web2py.
I can get around this by defining the links as external in framework7 but I wonder if it would not be better to have a way to tell web2py to redirect when the session has expired even when using Ajax calls.
Thanks,
Denes