Hi,

I want to do the following.
- login using auth.login
- if login fails captcha should be switched on and every further login (in
the same session) should require a correct captcha.

I have tried something like

def mylogin():
    session.logincount = (session.logincount or 0) + 1
    form=auth.login()
    if session.logincount != 1:
        form.element('table').insert(-1, '', Recaptcha(.....),''))
    return dict(form=form)

mylogin works, but I could not connect it with auth...
Maybe using auth.settings.login_url  or auth.settings.login_onvalidation is
the answer?

Regards, Martin

Reply via email to