Skip to content

Commit

Permalink
Fix Google login with auth code flow
Browse files Browse the repository at this point in the history
  • Loading branch information
c-w committed Feb 21, 2023
1 parent 33f14e8 commit 72b4f51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dj_rest_auth/registration/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def validate(self, attrs):
social_token.app = app

try:
if adapter.provider_id == 'google':
if adapter.provider_id == 'google' and not code:
login = self.get_social_login(adapter, app, social_token, response={'id_token': token})
else:
login = self.get_social_login(adapter, app, social_token, token)
Expand Down

0 comments on commit 72b4f51

Please sign in to comment.