Answer the question
In order to leave comments, you need to log in
Flask-security + reCaptcha?
Question for flask and python experts:
How to embed reCaptcha (eg wtforms-recaptcha ) in flask-security ?
I registered the form field:
class ExtendedRegisterForm(RegisterForm):
recaptcha = RecaptchaField(public_key='PUBLIC_KEY', private_key='PRIVATE_KEY', secure=True)
security = Security(app, user_datastore, register_form=ExtendedRegisterForm)
class CaptchaForm(Form):
captcha = RecaptchaField(public_key=RECAPTCHA_PUB_KEY, private_key=RECAPTCHA_PRIV_KEY, secure=True)
form = CaptchaForm(request.POST, captcha={'ip_address': request.META['REMOTE_ADDR']})]})
captcha={'ip_address': request.META['REMOTE_ADDR']})]}
in the case of Flask-Security
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question