[Zope] Redirect after login...

Joachim Werner joe@iuveno-net.de
Sun, 4 Nov 2001 23:45:15 +0100


Hello!

 > When of my site's users authenticates, I'd like to immediately redirect
 > them to their own home page in the system... In other words, upon
 > becoming a member of the system, each user will have their own instance
 > of a "member" class and upon authenticating, I want to forward them to
 > the "View" view of their class.

> Are you sure, you want that?

> I would be very angry, when that would happen, because it would make
> bookmarks to my private pages less effective.

>   Usually, the authentication (login) request comes up when I
>   access a protected page. When I log in, I want to see *THIS*
>   page and not my home page...

I think that the scenario Rob is talking about is a rather common one. We
have done several intranet or extranet systems with exactly these
requirements. People want to have one single login link on the public part
of the page that redirects users to the area they belong to after logging
in. This doesn't have to do anything with getting registered by the way.

It also doesn't interfere with bookmarking (or linking) pages within the
private part of the site, because if such a private page is accessed
directly, it will of course trigger a normal login. In case of BASIC
AUTHENTICATION, this will not cause any redirection anyway. If you use
Cookie Crumbler, you have the option of redirecting back to the URL you are
comming from, but it might be a bit complicated to configure ...

To answer Rob's second question: As Dieter Maurer points out, you can indeed
NOT use auto-login after successful registration in combination with plain
BASIC AUTHENTICATION, because you can not control the browser's way of
asking users for their credentials. With cookies, this is perfectly possible
...

Cheers

Joachim