Disable social user registration in django-allauth?

I noticed that by looking at django-allauth templates, signup_closed.html users can be redirected when user registration is closed or disabled. Does anyone familiar with this module know if there is a pre-configured parameter that can be set in settings.py to disable new user registration through existing social applications? Or do I need to configure this myself? I have read the full docs for allauth and I don't see any mention of this. Thanks.

+4
source share
2 answers

It looks like you need to override is_open_for_signup on your adapter.

See the code .

+8
source

More information at http://django-allauth.readthedocs.io/en/latest/advanced.html#custom-redirects .

You need to subclass allauth.account.adapter.DefaultAccountAdapter override is_open_for_signup and then set ACCOUNT_ADAPTER to your class in settings.py

+1
source

Source: https://habr.com/ru/post/1494050/


All Articles