JeffreyHsu said:
> i know repoze.who has already provide 'remember' function but i don't
> know how to use it.
It's already used automatically whenever authentication succeeds. By default
it remembers the user until s/he closes the browser (because it uses session
cookies).
> should i place a checkbox field such like 'remember_me' in the login
> form?
The "remember me" option used in many login forms is not the same thing as
repoze.who's "remember_me". The former is about remembering the user for a
given period of time, even if the user agent is closed, while the later will
last until the browser is closed and it's used all the time upon successful
logins.
At present the default repoze.who plugin used in TG2 to remember authenticated
users (AuthTktCookiePlugin) doesn't support setting the Expires/Max-Age
attribute of the cookies sent, but this will be solved soon:
http://bugs.repoze.org/issue87
Cheers.
--
Gustavo Narea <xri://=Gustavo>.
| Tech blog: =Gustavo/(+blog)/tech ~ About me: =Gustavo/about |