Skip to content

Commit

Permalink
Fix for #198 (#209)
Browse files Browse the repository at this point in the history
* Update serializers.py

we have to send response in 4-th paraameter to get_social_login, that is token, not access_token

* Update serializers.py
  • Loading branch information
fialkovod committed Mar 20, 2021
1 parent edba0f6 commit a865bc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dj_rest_auth/registration/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def validate(self, attrs):
# Case 1: We received the access_token
if access_token:
tokens_to_parse = {'access_token': access_token}
token = access_token
# For sign in with apple
id_token = attrs.get('id_token')
if id_token:
Expand Down Expand Up @@ -130,7 +131,7 @@ def validate(self, attrs):
social_token.app = app

try:
login = self.get_social_login(adapter, app, social_token, access_token)
login = self.get_social_login(adapter, app, social_token, token)
complete_social_login(request, login)
except HTTPError:
raise serializers.ValidationError(_("Incorrect value"))
Expand Down

0 comments on commit a865bc1

Please sign in to comment.