diff --git a/src/jwtauth/serializers.py b/src/jwtauth/serializers.py index fefccf1..cc5da7f 100644 --- a/src/jwtauth/serializers.py +++ b/src/jwtauth/serializers.py @@ -55,7 +55,7 @@ class LoginSerializer(serializers.Serializer): 'A password is required to log in' ) - user = authenticate(username=email, password=password) + user = authenticate(username=email, email=email, password=password) if user is None: raise serializers.ValidationError(