Skip to content

0.35.0

Compare
Choose a tag to compare
@dantownsend dantownsend released this 05 Jun 09:55
· 120 commits to master since this release

It is now trivially easy to add CAPTCHA support to the register and session_login endpoints, to provide protection against bots. Just sign up for an account with hCaptcha or reCAPTCHA, and do the following:

from fastapi import FastAPI
from piccolo_api.session_auth.endpoints import register
from piccolo_api.shared.auth.captcha import hcaptcha

app = FastAPI()

# To use hCaptcha:
app.mount(
    '/register/',
    register(
        captcha=hcaptcha(
            site_key='my-site-key',
            secret_key='my-secret-key',
        )
    )
)