Search code examples
pythondjangodjango-allauthpython-social-auth

Whitelist Specific Users for Django-allauth Signup


After django-allauth is integrated with a website, anyone can sign up by clicking the social app login or directly signing up. What shall be done to only allow specific users to sign up?

After searching through django-allauth documentation, I didn't find any configuration related. However, python-social-auth provides the WhiteList described in the question below.

Specifying whitelist of domain names still allows others to authenticate with python social auth and django


Solution

  • Solved by following the similar method of django-allauth: Only allow users from a specific google apps domain

    NOTE: If you turn off the local account sign up, then the social sign up has to be enabled separately!