mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-29 04:23:42 +03:00
Prevent double-validation in LoginSerializer
Modified branching statement to prevent double-validation when using "email" as the authentication method with Allauth.
This commit is contained in:
parent
658664a7d4
commit
8bd8d604ff
|
@ -71,7 +71,7 @@ class LoginSerializer(serializers.Serializer):
|
|||
user = self._validate_email(email, password)
|
||||
|
||||
# Authentication through username
|
||||
if app_settings.AUTHENTICATION_METHOD == app_settings.AuthenticationMethod.USERNAME:
|
||||
elif app_settings.AUTHENTICATION_METHOD == app_settings.AuthenticationMethod.USERNAME:
|
||||
user = self._validate_username(username, password)
|
||||
|
||||
# Authentication through either username or email
|
||||
|
|
Loading…
Reference in New Issue
Block a user