Django rest_auth.registration is sending back error even in successful registration Django rest_auth.registration is sending back error even in successful registration vue.js vue.js

Django rest_auth.registration is sending back error even in successful registration


For registration, rest_auth uses django_allauth. One of django_allauth's default settings is ACCOUNT_EMAIL_VERIFICATION (=”optional”). With it set to 'optional', it still tries to send out an email verification. So, you need to either:

  1. Setup an email backend (per the other answer)

OR

  1. Add ACCOUNT_EMAIL_VERIFICATION = 'none' in your settings.py


I was able to solve this issue by setting EMAIL_BACKEND and EMAIL_FILE_PATH (If applicable, depends on which backend you choose) in my Django settings.

It seems like the error happens when it tries to send the confirmation email on registration.

So in my case for local development:

EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'EMAIL_FILE_PATH = os.path.join(BASE_DIR, 'tmp/email')