From bf0df07075bc466cbf6d74ddca100130193a2f05 Mon Sep 17 00:00:00 2001 From: Allan Mogusu Date: Tue, 19 Feb 2019 14:34:07 +0300 Subject: [PATCH] bug(social-auth): Fixes social login bug - Set is_verified flag to true for socially logged in users [Starts #164201550] --- authors/apps/authentication/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/authors/apps/authentication/views.py b/authors/apps/authentication/views.py index 655a384..f4949d1 100644 --- a/authors/apps/authentication/views.py +++ b/authors/apps/authentication/views.py @@ -1,4 +1,6 @@ import os +from builtins import BaseException + from datetime import datetime, timedelta import jwt @@ -278,5 +280,7 @@ def create(self, request, *args, **kwargs): serializer = UserSerializer(user) serializer_data = serializer.data serializer_data["token"] = get_jwt_token(user) + user.is_verified = True + user.save() return Response(serializer_data, status=status.HTTP_200_OK)