Tivix / django-rest-auth

This app makes it extremely easy to build Django powered SPA's (Single Page App) or Mobile apps exposing all registration and authentication related functionality as CBV's (Class Base View) and REST (JSON)
www.tivix.com
MIT License
2.4k stars 662 forks source link

Failed to run with the lates allauth lib #670

Open Mixser opened 10 months ago

Mixser commented 10 months ago

The allauth.utils module no longer contains the email_address_existsfunction (see commit: https://github.com/pennersr/django-allauth/commit/9fccdd08eacc2be9dcd284bc7edce9de692c5543). Consequently, this leads to that we are unable to run with the latest version of the Allauth library due to the absence of the email_address_exists function in the allauth.utils module.


ImportError: allauth needs to be added to INSTALLED_APPS.

at this line https://github.com/Tivix/django-rest-auth/blob/cdd04aa9be7ad3da6b417380ee14b3ff4d5459ba/rest_auth/registration/serializers.py#L7

lingster commented 6 months ago

my understanding is that this package is no longer maintained. You should be able to replace this with dj-rest-auth :

https://github.com/iMerica/dj-rest-auth

pranav-sharma-au5 commented 5 months ago

This is a workaround

from allauth.account.models import EmailAddress

def email_exists(email):
    return EmailAddress.objects.filter(email=email).exists()