add refresh token to case 1 too

This commit is contained in:
fpghost 2018-11-16 10:51:54 +01:00
parent 46f7c18757
commit c47b641c62

View File

@ -81,6 +81,8 @@ class SocialLoginSerializer(serializers.Serializer):
# Case 1: We received the access_token # Case 1: We received the access_token
if attrs.get('access_token'): if attrs.get('access_token'):
access_token = attrs.get('access_token') access_token = attrs.get('access_token')
# Also optional refresh token
refresh_token = attrs.get('refresh_token')
# Case 2: We received the authorization code # Case 2: We received the authorization code
elif attrs.get('code'): elif attrs.get('code'):