Django-allauth 注册的白名单特定用户

Whitelist Specific Users for Django-allauth Signup

django-allauth 与网站集成后,任何人都可以通过点击社交应用程序登录或直接注册来注册。只允许特定用户注册应该怎么做?

通过 django-allauth 文档搜索后,我没有找到任何相关的配置。但是,python-social-auth 提供了下面问题中描述的白名单。

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

按照django-allauth: Only allow users from a specific google apps domain

类似的方法解决

注意:如果您关闭本地帐户注册,则必须单独启用社交注册!