mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 00:56:34 +03:00
Rename variable for clarity
We have two variables named `token` which have different data types
This commit is contained in:
parent
f09bbaf877
commit
6812deeeb4
|
@ -99,11 +99,11 @@ class SocialLoginSerializer(serializers.Serializer):
|
|||
else:
|
||||
raise serializers.ValidationError(_('Incorrect input. access_token or code is required.'))
|
||||
|
||||
token = adapter.parse_token({'access_token': access_token})
|
||||
token.app = app
|
||||
social_token = adapter.parse_token({'access_token': access_token})
|
||||
social_token.app = app
|
||||
|
||||
try:
|
||||
login = self.get_social_login(adapter, app, token, access_token)
|
||||
login = self.get_social_login(adapter, app, social_token, access_token)
|
||||
complete_social_login(request, login)
|
||||
except HTTPError:
|
||||
raise serializers.ValidationError(_('Incorrect value'))
|
||||
|
|
Loading…
Reference in New Issue
Block a user