Last Modified
2012-07-30 18:24:18 +0000
Requires

Description

Impelments redirect_back_or. i.e. remembers where you’ve come from on a failed login and stores this inforamtion in the session. When you’re finally logged in you can use the redirect_back_or helper to redirect them either back where they came from, or a pre-defined url.

Here’s some examples:

1. User visits login form and is logged in
   - redirect to the provided (default) url

2. User vists a page (/page) and gets kicked to login (raised Unauthenticated)
   - On successful login, the user may be redirect_back_or("/home") and they will
     return to the /page url.  The /home  url is ignored