Skip to content

Commit

Permalink
fix(google): Avoid id_token error after allauth upgrade (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
luchinke committed Feb 13, 2023
1 parent 5300916 commit 3c392aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dj_rest_auth/registration/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ def validate(self, attrs):
social_token.app = app

try:
login = self.get_social_login(adapter, app, social_token, token)
if adapter.provider_id == 'google':
login = self.get_social_login(adapter, app, social_token, response={'id_token': token})
else:
login = self.get_social_login(adapter, app, social_token, token)
ret = complete_social_login(request, login)
except HTTPError:
raise serializers.ValidationError(_('Incorrect value'))
Expand Down

0 comments on commit 3c392aa

Please sign in to comment.