diff --git a/src/jwtauth/serializers.py b/src/jwtauth/serializers.py index f07bedb..66410d3 100644 --- a/src/jwtauth/serializers.py +++ b/src/jwtauth/serializers.py @@ -28,7 +28,7 @@ class RegistrationSerializer(serializers.ModelSerializer): user=user ) return { - 'username': user.username, + 'username': user.email, 'access_token': user.access_token, 'refresh_token': token.token }