Closed mustansirgodhrawala closed 1 year ago
Nice solution. I'm going to close this because this package does not intend to support every possible feature of all-auth.
All-auth is only connected to this repo through an optional dependency for registration and it causes more problems than it solves.
Problem
Django allauth rate limit using the setting variable below did not work for me. I do not know if this is a bug, or something else altogether or whether it's been referenced before. For anyone looking to make something like this work with dj_rest_auth in its current state they can implement some as I've done.
My Solution
I added the following to urls.py overriding the default resend email verification view.
I create the following view in one of my apps as such and import it into the urls.py above
class CustomResendEmailVerificationThrottle(UserRateThrottle, AnonRateThrottle): rate = '24/day'
class CustomResendEmailVerificationView(ResendEmailVerificationView): throttle_classes = [CustomResendEmailVerificationThrottle]