Add limiters to auth routes

This commit is contained in:
Adrià Casajús 2022-03-29 18:14:13 +02:00
parent b0023981af
commit d6df5e0ea0
No known key found for this signature in database
GPG Key ID: F0033226A5AFC9B9
1 changed files with 4 additions and 0 deletions

View File

@ -168,6 +168,7 @@ def auth_activate():
@api_bp.route("/auth/reactivate", methods=["POST"])
@limiter.limit('10/minute')
def auth_reactivate():
"""
User asks for another activation code
@ -209,6 +210,7 @@ def auth_reactivate():
@api_bp.route("/auth/facebook", methods=["POST"])
@limiter.limit('10/minute')
def auth_facebook():
"""
Authenticate user with Facebook
@ -259,6 +261,7 @@ def auth_facebook():
@api_bp.route("/auth/google", methods=["POST"])
@limiter.limit('10/minute')
def auth_google():
"""
Authenticate user with Google
@ -335,6 +338,7 @@ def auth_payload(user, device) -> dict:
@api_bp.route("/auth/forgot_password", methods=["POST"])
@limiter.limit('10/minute')
def forgot_password():
"""
User forgot password