On Wednesday, August 19, 2015 at 1:20:49 PM UTC-4, Richard wrote:
>
> Hello,
>
> I often, fall on this annoying issue... I alway leaves multiple tabs all 
> accessing my app open... When the browser get restart, all this tabs get 
> redirected to "user/login?_next=..." URL when I have been logged out from 
> the system... I found it unpleasant that, if I log in in one of the tab, I 
> can't just refresh the other tabs... Reload the page still require me to 
> input my credentials again or that I remove the "user/login?_next=" from 
> the URL to avoid log in even if I am logged in...
>
> I don't know if we could implement something that would make some 
> redirection to the next URL component on page reload and how this could 
> cause overhead of doing so... But it could make this repetitive task a 
> memory if it could be implement easilly...
>

Maybe early in the Auth.login method, there could be a check to see if the 
user is already logged in (i.e., check for the existence of self.user) and 
if there is a _next URL -- in that case, there could just be an immediate 
redirect to the _next URL without bothering with the login. That way, if 
you re-login in one tab and then hit refresh in another tab, the other tab 
will return to its original page.

Anthony
 

>
> Richard
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to