Skip to content

Commit 5e5e941

Browse files
authored
Merge pull request #361 from PROCOLLAB-github/fix/passwords-endpoint-skills
delete comparing of passwords
2 parents 497134b + e2586e1 commit 5e5e941

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

users/serializers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,5 +481,4 @@ class CustomObtainPairSerializer(TokenObtainPairSerializer):
481481
def get_token(cls, user):
482482
token = super().get_token(user)
483483
token["email"] = user.email
484-
token["password"] = user.password
485484
return token

users/views.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.apps import apps
33
from django.conf import settings
44
from django.contrib.auth import get_user_model
5-
from django.contrib.auth.hashers import check_password
5+
66
from django.db import transaction
77
from django.db.models import Q
88
from django.shortcuts import redirect, get_object_or_404
@@ -418,6 +418,4 @@ class SingleUserDataView(ListAPIView):
418418
authentication_off = True
419419

420420
def get_queryset(self) -> User:
421-
user = get_object_or_404(User, email=self.request.data["email"])
422-
if check_password(self.request.data["password"], user.password):
423-
return [user]
421+
return [get_object_or_404(User, email=self.request.data["email"])]

0 commit comments

Comments
 (0)