Hey folks, Here's a recipe I'm currently using for Pagoda's admin interface login. It has a couple advantages over the default login controller and the verify_login recipe.
Controller code: http://paste.turbogears.org/paste/1546 Template code: http://paste.turbogears.org/paste/1545 The thing I dislike most about the default login controller is that it POSTs to the requested resource after a successful login -- if the user refreshes the page they'll get an annoying message about POST data. Like the verify_login recipe, this fixes that by having login POST to itself and then redirect from there. Couple other things... - Browsing to /login will redirect to the default page if they're already authenticated - Logging in after logging out will go to the page from which they logged out - Checks for redirects to /login or /logout and goes to the default page instead - No chance of clobbering previous_url and forward_url with hidden inputs in the template I've tested a bunch of cases and it's working for me. If you find a case where it redirects incorrectly let me know. -- Brian Beck / Adventurer of the First Order / www.brianbeck.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

