This commit is contained in:
Luke Burden 2022-03-14 11:53:26 +03:00 committed by GitHub
commit c22d190796
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,6 +142,10 @@ class SocialLoginSerializer(serializers.Serializer):
login.lookup()
login.save(request, connect=True)
# we return the login data (and so User and SocialAccount instances) here
# such that custom login and connect views can render suitable responses
attrs['login'] = login
# we still return `user` here for backwards compatibility
attrs['user'] = login.account.user
return attrs