Open AliceWi opened 2 months ago
Hi @AliceWi , thanks for the idea. This should not be to hard to implement.
A custom EmailValidator with an allowlist?
I think it needs to be implemented here: https://github.com/rdmorganiser/rdmo/blob/main/rdmo/accounts/adapter.py#L14. The adapter hooks into allauth signup process. I think we just need to implement clean_email
https://github.com/pennersr/django-allauth/blob/main/allauth/account/adapter.py#L346.
Rationale / Begründung
User registrations can come from any email domain, which may lead to spam accounts, security risks, or unwanted users in the system. Implementing an email domain whitelist restricts user registrations to approved domains only, for example university or institute domains.
Affected
Users, Admins
Minimal functionality
Nice-to-have functionality
References / Verweise