I am using django 1.10 and django-allauth for authentication on my website.
For email/password (i.e. non social) login, I want to be able to place code to check the email - so that I DISALLOW signup from certain well known spammy domains.
So I want to incorporate logic like this:
BANNED_DOMAINS = ('foobar.com', 'foo.biz', 'example.')
def email_has_banned_domain(email):
found = False
for x in BANNED_DOMAINS:
if x in email:
found = True
break
return found
How do I then, incorporate this simple function to the allautrh workflow, to prevent singups from banned domains?