Skip to content


LoginPasswordMaxTryMiddleware (💗 Pro only)

If you want limit login failed ip with error password, you can use LoginPasswordMaxTryMiddleware.

from starlette.middleware.base import BaseHTTPMiddleware
from fastapi_admin import middlewares
from import app as admin_app

                         dispatch=middlewares.LoginPasswordMaxTryMiddleware(max_times=3, after_seconds=3600))

After that, user can try max 3 times password, if all failed, the ip will be limited 3600 seconds.

Last update: August 28, 2022 06:31:41