Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Commit 3aaf9ec6 authored by jahnsmichael's avatar jahnsmichael
Browse files

[CHORES] get user by username instead of email

parent 616b0cf5
Branches jahns/google-oauth-playground
No related tags found
3 merge requests!42Pbi 12 google oauth,!36Google OAuth2,!18Google OAuth [!! Experimental]
Pipeline #78234 passed
......@@ -23,7 +23,7 @@ class GoogleView(APIView):
data = json.loads(res.text)
try:
user = User.objects.get(email=data['email'])
user = User.objects.get(username=data['email'])
accounts = Account.objects.get(user=user)
except (User.DoesNotExist, Account.DoesNotExist):
return Response(data, status=status.HTTP_203_NON_AUTHORITATIVE_INFORMATION)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment