>
> > I don't think it's a bug, per se, but the behavior (and documentation) 
> could 
> > be improved. 
>
> ??? The documentation is quite direct and clear that you can set 
> auth.settings.register_next to control where the user goes next. It 
> doesn't work. It's not even clear that it can work given the current 
> code base.


Here's what the book says:

These must point to the URL you want to redirect your users to after the 
various possible auth actions (in case there is no referrer):


Notice the highlighted text. The _next URLs are default redirect URLs *when 
there is no referring page*, and auth.settings.register_next does in fact 
work when there is no referring page (i.e., when there is no _next var in 
the URL). The issue is not with auth.settings.register_next, but with the 
auth.navbar() helper. The navbar helper always adds the current page URL as 
the _next var in the register link, so if you use the navbar to get to the 
registration page, you will be redirected back to the page from which you 
clicked the link.

Note, you do not have to use the navbar to generate your Auth links. If you 
do want to use it, there is an easy workaround. If you don't want to have 
to use a workaround, then as I suggested, perhaps we can improve the navbar 
by enabling some redirect options. But I still don't see a bug with 
auth.settings.register_next. The intended behavior is that a referrer takes 
precedence, and auth.settings.register_next is the default when there is no 
referrer -- and that's how it works. We now just need an easy way to 
prevent the navbar from automatically adding a referrer.

Anthony

Reply via email to