I'm having trouble setting post-login redirection behavior.

Let's start with the fact that, according to Massimo in this post
(http://groups.google.com/group/web2py/msg/c07acc2f4395f6e4) ,

"Right now there are two possibilities:
- if web2py redirects you to login, after login, login redirects you
to the referencing page
- if you go to the login page without redirection, after login, you
go
to login_next"

In other words, being forced to login by an auth-decorated method will
cause you to be returned to the referring URL, but if you click on the
"login" link, it will use the auth.settings.login_next value as the
post-login target.

I think the duality of this behavior is confusing and inconsistent:
a) It would make more sense for all post-login behavior to follow the
same set of rules.
b) The default post-login behavior should in all cases be to redirect
to the referring URL.

Beyond this, I'm seeing the following buggy behavior:

If I hit an auth-decorated function, and am forced to log in, then ALL
post-login redirections will use that same url from that point
forward, regardless of how the login page is reached, and regardless
of whether login_next is set. This behavior can only be reset by
clearing the application session.

And finally, what's the proper way to set things up so that all post-
login redirects use the referring URL? Is this possible?

Thanks

Reply via email to